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:
@@ -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
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user