Fix merge request
This commit is contained in:
@ -23,12 +23,17 @@
|
||||
package org.owasp.webwolf;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.DependsOn;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.jdbc.datasource.DriverManagerDataSource;
|
||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.sql.DataSource;
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
@ -59,4 +64,12 @@ public class MvcConfiguration implements WebMvcConfigurer {
|
||||
file.mkdirs();
|
||||
}
|
||||
}
|
||||
|
||||
@Bean
|
||||
@Primary
|
||||
public DataSource dataSource(@Value("${spring.datasource.url}") String url) {
|
||||
DriverManagerDataSource driverManagerDataSource = new DriverManagerDataSource(url);
|
||||
driverManagerDataSource.setDriverClassName("org.hsqldb.jdbc.JDBCDriver");
|
||||
return driverManagerDataSource;
|
||||
}
|
||||
}
|
@ -80,7 +80,6 @@ public class Requests {
|
||||
}
|
||||
|
||||
private boolean allowedTrace(HttpTrace t, UserDetails user) {
|
||||
|
||||
Request req = t.getRequest();
|
||||
boolean allowed = true;
|
||||
/* do not show certain traces to other users in a classroom setup */
|
||||
|
@ -8,6 +8,7 @@ server.servlet.session.cookie.name=WEBWOLFSESSION
|
||||
server.servlet.session.timeout=6000
|
||||
|
||||
spring.datasource.url=jdbc:hsqldb:hsql://${WEBGOAT_HOST:127.0.0.1}:${WEBGOAT_HSQLPORT:9001}/webgoat
|
||||
spring.jpa.properties.hibernate.default_schema=CONTAINER
|
||||
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.HSQLDialect
|
||||
spring.jpa.hibernate.ddl-auto=update
|
||||
spring.messages.basename=i18n/messages
|
||||
|
Reference in New Issue
Block a user