Skip to content

Commit 3adfdd3

Browse files
author
Dave Syer
committed
Use simplified @grab where possible
1 parent 1dd0cca commit 3adfdd3

File tree

8 files changed

+13
-46
lines changed

8 files changed

+13
-46
lines changed

spring-boot-cli/samples/actuator.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package org.test
22

3-
@Grab("org.springframework.boot:spring-boot-starter-actuator:0.5.0.BUILD-SNAPSHOT")
3+
@Grab("spring-boot-starter-actuator")
44

55
@Controller
66
class SampleController {

spring-boot-cli/samples/device.groovy

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ class Example {
66

77
@RequestMapping("/")
88
@ResponseBody
9-
public String helloWorld(Device device) {
9+
String helloWorld(Device device) {
1010
if (device.isNormal()) {
11-
return "Hello Normal Device!"
11+
"Hello Normal Device!"
1212
} else if (device.isMobile()) {
13-
return "Hello Mobile Device!"
13+
"Hello Mobile Device!"
1414
} else if (device.isTablet()) {
15-
return "Hello Tablet Device!"
15+
"Hello Tablet Device!"
1616
} else {
17-
return "Hello Unknown Device!"
17+
"Hello Unknown Device!"
1818
}
1919
}
2020

spring-boot-cli/samples/job.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package org.test
22

3-
@Grab("org.hsqldb:hsqldb-j5:2.0.0")
3+
@Grab("hsqldb")
44
@Configuration
55
@EnableBatchProcessing
66
class JobConfig {

spring-boot-cli/samples/simpleGrab.groovy

Lines changed: 0 additions & 24 deletions
This file was deleted.

spring-boot-cli/samples/tx.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package org.test
22

3-
@Grab("org.hsqldb:hsqldb:2.2.9")
3+
@Grab("hsqldb")
44

55
@Configuration
66
@EnableTransactionManagement

spring-boot-cli/samples/ui.groovy

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package app
22

3-
import groovy.util.logging.Log
4-
5-
@Grab("org.thymeleaf:thymeleaf-spring3:2.0.16")
3+
@Grab("thymeleaf-spring3")
64
@Controller
75
class Example {
86

spring-boot-cli/src/test/java/org/springframework/boot/cli/SampleIntegrationTests.java

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616

1717
package org.springframework.boot.cli;
1818

19-
import static org.junit.Assert.assertEquals;
20-
import static org.junit.Assert.assertTrue;
21-
2219
import java.io.File;
2320
import java.net.URL;
2421
import java.util.concurrent.Callable;
@@ -37,6 +34,9 @@
3734
import org.springframework.boot.cli.command.CleanCommand;
3835
import org.springframework.boot.cli.command.RunCommand;
3936

37+
import static org.junit.Assert.assertEquals;
38+
import static org.junit.Assert.assertTrue;
39+
4040
/**
4141
* Integration tests to exercise the samples.
4242
*
@@ -95,13 +95,6 @@ public void appSample() throws Exception {
9595
assertTrue("Wrong output: " + output, output.contains("Hello World"));
9696
}
9797

98-
@Test
99-
public void simpleGrabSample() throws Exception {
100-
start("samples/simpleGrab.groovy");
101-
String output = this.outputCapture.getOutputAndRelease();
102-
assertTrue("Wrong output: " + output, output.contains("Hello World"));
103-
}
104-
10598
@Test
10699
public void templateSample() throws Exception {
107100
start("samples/template.groovy");

spring-boot-dependencies/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<slf4j.version>1.7.5</slf4j.version>
3434
<snakeyaml.version>1.12</snakeyaml.version>
3535
<spock.version>0.7-groovy-2.0</spock.version>
36-
<spring.version>4.0.0.M3</spring.version>
36+
<spring.version>4.0.0.BUILD-SNAPSHOT</spring.version>
3737
<spring-security.version>3.2.0.RC1</spring-security.version>
3838
<spring-integration.version>2.2.4.RELEASE</spring-integration.version>
3939
<spring-integration-groovydsl.version>1.0.0.M1</spring-integration-groovydsl.version>

0 commit comments

Comments
 (0)