Relocate projects to spring-boot-project
Move projects to better reflect the way that Spring Boot is released. The following projects are under `spring-boot-project`: - `spring-boot` - `spring-boot-autoconfigure` - `spring-boot-tools` - `spring-boot-starters` - `spring-boot-actuator` - `spring-boot-actuator-autoconfigure` - `spring-boot-test` - `spring-boot-test-autoconfigure` - `spring-boot-devtools` - `spring-boot-cli` - `spring-boot-docs` See gh-9316
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
@GrabResolver(name='clojars.org', root='http://clojars.org/repo')
|
||||
@Grab('redis.embedded:embedded-redis:0.2')
|
||||
|
||||
@Component
|
||||
class EmbeddedRedis {
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package org.test
|
||||
|
||||
@EnableGroovyTemplates
|
||||
@Component
|
||||
class Example implements CommandLineRunner {
|
||||
|
||||
@Autowired
|
||||
private MyService myService
|
||||
|
||||
void run(String... args) {
|
||||
println "Hello ${this.myService.sayWorld()}"
|
||||
println getClass().getResource('/public/public.txt')
|
||||
println getClass().getResource('/resources/resource.txt')
|
||||
println getClass().getResource('/static/static.txt')
|
||||
println getClass().getResource('/templates/template.txt')
|
||||
println getClass().getResource('/root.properties')
|
||||
println template('template.txt', [world:'Mama'])
|
||||
}
|
||||
}
|
||||
|
||||
@Service
|
||||
class MyService {
|
||||
|
||||
String sayWorld() {
|
||||
return 'World!'
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
Goodbye ${world}
|
||||
@@ -0,0 +1,10 @@
|
||||
package org.test
|
||||
|
||||
@Component
|
||||
class Example implements CommandLineRunner {
|
||||
|
||||
void run(String... args) {
|
||||
print "Ssshh"
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package org.test
|
||||
|
||||
@RestController
|
||||
class WarExample implements CommandLineRunner {
|
||||
|
||||
@RequestMapping("/")
|
||||
public String hello() {
|
||||
return "Hello"
|
||||
}
|
||||
|
||||
void run(String... args) {
|
||||
println getClass().getResource('/org/apache/tomcat/InstanceManager.class')
|
||||
println getClass().getResource('/root.properties')
|
||||
throw new RuntimeException("onStart error")
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user