Extract actuator security into separate classes

So spring-security + a web app is secure by default
(you don't need the actuator).
This commit is contained in:
Dave Syer
2013-11-20 17:54:59 +00:00
parent 285dd5b270
commit bd26b28aa5
28 changed files with 663 additions and 313 deletions

View File

@@ -44,8 +44,7 @@ public class ReproIntegrationTests {
@Test
public void securityDependencies() throws Exception {
this.cli.run("secure.groovy");
assertThat(this.cli.getHttpOutput(),
containsString("{\"message\":\"Hello World\"}"));
assertThat(this.cli.getOutput(), containsString("Hello World"));
}
@Test

View File

@@ -3,12 +3,12 @@ package org.test
// No security features added just a test that the dependencies are resolved
@Grab("spring-boot-starter-security")
@RestController
class SampleController {
@Controller
class Sample implements CommandLineRunner {
@RequestMapping("/")
public def hello() {
[message: "Hello World"]
@Override
void run(String... args) {
println "Hello World"
}
}