First attempt to remove JSP and move to Thymeleaf and update to Spring Boot. The Thymeleaf templates can be loaded as snippets which makes it more easy to move away from ECS and create normal HTML pages for a lesson.
This commit is contained in:
@ -0,0 +1,53 @@
|
||||
package org.owasp.webgoat;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.boot.context.web.SpringBootServletInitializer;
|
||||
|
||||
import javax.servlet.ServletContext;
|
||||
import javax.servlet.ServletException;
|
||||
|
||||
@SpringBootApplication
|
||||
public class WebGoat extends SpringBootServletInitializer {
|
||||
|
||||
@Override
|
||||
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
|
||||
return application.sources(WebGoat.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStartup(ServletContext servletContext) throws ServletException {
|
||||
super.onStartup(servletContext);
|
||||
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
SpringApplication.run(WebGoat.class, args);
|
||||
}
|
||||
|
||||
// @Bean
|
||||
// @Autowired
|
||||
// public TomcatEmbeddedServletContainerFactory servletContainer(final JarScanner jarScanner) {
|
||||
// TomcatEmbeddedServletContainerFactory factory = new TomcatEmbeddedServletContainerFactory();
|
||||
// factory.setPort(80);
|
||||
// factory.setSessionTimeout(10, TimeUnit.MINUTES);
|
||||
// factory.addContextCustomizers(new TomcatContextCustomizer() {
|
||||
// @Override
|
||||
// public void customize(Context context) {
|
||||
//
|
||||
// context.setJarScanner(jarScanner);
|
||||
// }
|
||||
// });
|
||||
// return factory;
|
||||
// }
|
||||
//
|
||||
// @Bean
|
||||
// public JarScanner getJarScanner() {
|
||||
// StandardJarScanner jarScanner = new StandardJarScanner();
|
||||
// jarScanner.setScanClassPath(true);
|
||||
// return jarScanner;
|
||||
// }
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user