Apply formatting
This will make sure we have a consistent style across our project and the PRs are only concerned with actual changes and no longer about style.
This commit is contained in:
@ -5,6 +5,4 @@ import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
@ComponentScan("org.owasp.webgoat.server")
|
||||
public class ParentConfig {
|
||||
|
||||
}
|
||||
public class ParentConfig {}
|
||||
|
@ -35,13 +35,16 @@ import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
@Slf4j
|
||||
public class StartWebGoat {
|
||||
|
||||
public static void main(String[] args) {
|
||||
new SpringApplicationBuilder().parent(ParentConfig.class)
|
||||
.web(WebApplicationType.NONE).bannerMode(Banner.Mode.OFF)
|
||||
.child(WebGoat.class)
|
||||
.web(WebApplicationType.SERVLET)
|
||||
.sibling(WebWolf.class).bannerMode(Banner.Mode.OFF)
|
||||
.web(WebApplicationType.SERVLET)
|
||||
.run(args);
|
||||
}
|
||||
public static void main(String[] args) {
|
||||
new SpringApplicationBuilder()
|
||||
.parent(ParentConfig.class)
|
||||
.web(WebApplicationType.NONE)
|
||||
.bannerMode(Banner.Mode.OFF)
|
||||
.child(WebGoat.class)
|
||||
.web(WebApplicationType.SERVLET)
|
||||
.sibling(WebWolf.class)
|
||||
.bannerMode(Banner.Mode.OFF)
|
||||
.web(WebApplicationType.SERVLET)
|
||||
.run(args);
|
||||
}
|
||||
}
|
||||
|
@ -13,21 +13,21 @@ import org.springframework.util.StringUtils;
|
||||
@NoArgsConstructor
|
||||
public class StartupMessage {
|
||||
|
||||
private String port;
|
||||
private String address;
|
||||
private String port;
|
||||
private String address;
|
||||
|
||||
@EventListener
|
||||
void onStartup(ApplicationReadyEvent event) {
|
||||
if (StringUtils.hasText(port) && !StringUtils.hasText(System.getProperty("running.in.docker"))) {
|
||||
log.info("Please browse to http://{}:{}/WebGoat to get started...", address, port);
|
||||
}
|
||||
if (event.getApplicationContext().getApplicationName().contains("WebGoat")) {
|
||||
port = event.getApplicationContext().getEnvironment().getProperty("server.port");
|
||||
address = event.getApplicationContext().getEnvironment().getProperty("server.address");
|
||||
}
|
||||
@EventListener
|
||||
void onStartup(ApplicationReadyEvent event) {
|
||||
if (StringUtils.hasText(port)
|
||||
&& !StringUtils.hasText(System.getProperty("running.in.docker"))) {
|
||||
log.info("Please browse to http://{}:{}/WebGoat to get started...", address, port);
|
||||
}
|
||||
if (event.getApplicationContext().getApplicationName().contains("WebGoat")) {
|
||||
port = event.getApplicationContext().getEnvironment().getProperty("server.port");
|
||||
address = event.getApplicationContext().getEnvironment().getProperty("server.address");
|
||||
}
|
||||
}
|
||||
|
||||
@EventListener
|
||||
void onShutdown(ContextStoppedEvent event) {
|
||||
}
|
||||
@EventListener
|
||||
void onShutdown(ContextStoppedEvent event) {}
|
||||
}
|
||||
|
Reference in New Issue
Block a user