Skip to content

Commit

Permalink
Use simplified @grab where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Syer committed Oct 9, 2013
1 parent 1dd0cca commit 3adfdd3
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 46 deletions.
2 changes: 1 addition & 1 deletion spring-boot-cli/samples/actuator.groovy
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.test

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

@Controller
class SampleController {
Expand Down
10 changes: 5 additions & 5 deletions spring-boot-cli/samples/device.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ class Example {

@RequestMapping("/")
@ResponseBody
public String helloWorld(Device device) {
String helloWorld(Device device) {
if (device.isNormal()) {
return "Hello Normal Device!"
"Hello Normal Device!"
} else if (device.isMobile()) {
return "Hello Mobile Device!"
"Hello Mobile Device!"
} else if (device.isTablet()) {
return "Hello Tablet Device!"
"Hello Tablet Device!"
} else {
return "Hello Unknown Device!"
"Hello Unknown Device!"
}
}

Expand Down
2 changes: 1 addition & 1 deletion spring-boot-cli/samples/job.groovy
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.test

@Grab("org.hsqldb:hsqldb-j5:2.0.0")
@Grab("hsqldb")
@Configuration
@EnableBatchProcessing
class JobConfig {
Expand Down
24 changes: 0 additions & 24 deletions spring-boot-cli/samples/simpleGrab.groovy

This file was deleted.

2 changes: 1 addition & 1 deletion spring-boot-cli/samples/tx.groovy
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.test

@Grab("org.hsqldb:hsqldb:2.2.9")
@Grab("hsqldb")

@Configuration
@EnableTransactionManagement
Expand Down
4 changes: 1 addition & 3 deletions spring-boot-cli/samples/ui.groovy
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package app

import groovy.util.logging.Log

@Grab("org.thymeleaf:thymeleaf-spring3:2.0.16")
@Grab("thymeleaf-spring3")
@Controller
class Example {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@

package org.springframework.boot.cli;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

import java.io.File;
import java.net.URL;
import java.util.concurrent.Callable;
Expand All @@ -37,6 +34,9 @@
import org.springframework.boot.cli.command.CleanCommand;
import org.springframework.boot.cli.command.RunCommand;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

/**
* Integration tests to exercise the samples.
*
Expand Down Expand Up @@ -95,13 +95,6 @@ public void appSample() throws Exception {
assertTrue("Wrong output: " + output, output.contains("Hello World"));
}

@Test
public void simpleGrabSample() throws Exception {
start("samples/simpleGrab.groovy");
String output = this.outputCapture.getOutputAndRelease();
assertTrue("Wrong output: " + output, output.contains("Hello World"));
}

@Test
public void templateSample() throws Exception {
start("samples/template.groovy");
Expand Down
2 changes: 1 addition & 1 deletion spring-boot-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<slf4j.version>1.7.5</slf4j.version>
<snakeyaml.version>1.12</snakeyaml.version>
<spock.version>0.7-groovy-2.0</spock.version>
<spring.version>4.0.0.M3</spring.version>
<spring.version>4.0.0.BUILD-SNAPSHOT</spring.version>
<spring-security.version>3.2.0.RC1</spring-security.version>
<spring-integration.version>2.2.4.RELEASE</spring-integration.version>
<spring-integration-groovydsl.version>1.0.0.M1</spring-integration-groovydsl.version>
Expand Down

0 comments on commit 3adfdd3

Please sign in to comment.