File tree Expand file tree Collapse file tree 4 files changed +29
-16
lines changed
main/java/org/springframework/boot/cli/compiler
java/org/springframework/boot/cli Expand file tree Collapse file tree 4 files changed +29
-16
lines changed Original file line number Diff line number Diff line change 1+ package org.test
2+
3+ @Grab (" org.codehaus.groovy.modules.http-builder:http-builder:0.5.2" ) // This one just to test dependency resolution
4+ import groovyx.net.http.*
5+
6+ @Controller
7+ class Example implements CommandLineRunner {
8+
9+ @RequestMapping (" /" )
10+ @ResponseBody
11+ public String helloWorld () {
12+ return " World!"
13+ }
14+
15+ void run (String ... args ) {
16+ def world = new RESTClient (" http://localhost:8080" ). get(path :" /" ). data. text
17+ print " Hello " + world
18+ }
19+ }
Original file line number Diff line number Diff line change @@ -83,6 +83,7 @@ private void setupResolver(IvySettings settings) {
8383 SpringBootResolver springBootResolver = new SpringBootResolver (
8484 grapesResolver .getResolvers ());
8585 springBootResolver .setSettings (settings );
86+ springBootResolver .setReturnFirst (grapesResolver .isReturnFirst ());
8687 springBootResolver .setName ("springBoot" );
8788
8889 if (!Boolean .getBoolean ("disableSpringSnapshotRepos" )) {
Original file line number Diff line number Diff line change @@ -155,6 +155,13 @@ public void actuatorSample() throws Exception {
155155 assertEquals ("{\" message\" :\" Hello World!\" }" , result );
156156 }
157157
158+ @ Test
159+ public void httpSample () throws Exception {
160+ start ("samples/http.groovy" );
161+ String output = this .outputCapture .getOutputAndRelease ();
162+ assertTrue ("Wrong output: " + output , output .contains ("Hello World" ));
163+ }
164+
158165 @ Test
159166 public void integrationSample () throws Exception {
160167 start ("samples/integration.groovy" );
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" UTF-8" ?>
22<configuration >
3- <property name =" CONSOLE_LOG_PATTERN" value =" %d{yyyy-MM-dd HH:mm:ss.SSS} %5p ${PID:- } [%t] --- %-40.40logger{39} : %m%n%wex" />
4-
5- <conversionRule conversionWord =" wex" converterClass =" org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" />
6-
7- <appender name =" CONSOLE" class =" ch.qos.logback.core.ConsoleAppender" >
8- <encoder >
9- <pattern >${CONSOLE_LOG_PATTERN}</pattern >
10- </encoder >
11- </appender >
12-
13- <root level =" INFO" >
14- <appender-ref ref =" CONSOLE" />
15- </root >
16-
17- <!-- logger name="org.springframework" level="DEBUG"/-->
18-
3+ <include resource =" org/springframework/boot/logging/logback/base.xml" />
4+ <!-- logger name="org.springframework.web" level="DEBUG"/-->
195</configuration >
You can’t perform that action at this time.
0 commit comments