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:
Nanne Baars
2016-04-05 08:19:50 +02:00
parent 7f91671c8f
commit ecc8cb391b
186 changed files with 14439 additions and 13920 deletions

View File

@ -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;
// }
}