diff --git a/wise-webapp/src/main/java/com/wisemapping/config/Application.java b/wise-webapp/src/main/java/com/wisemapping/config/Application.java index a76f9a1c..ff909d88 100644 --- a/wise-webapp/src/main/java/com/wisemapping/config/Application.java +++ b/wise-webapp/src/main/java/com/wisemapping/config/Application.java @@ -4,6 +4,8 @@ import com.wisemapping.config.common.CommonConfig; import com.wisemapping.config.common.HibernateConfig; import com.wisemapping.config.common.InterceptorsConfig; import com.wisemapping.config.common.SecurityConfig; +import com.wisemapping.config.mvc.MvcAppConfig; +import com.wisemapping.config.mvc.MvcSecurityConfig; import com.wisemapping.config.rest.ServletConfig; import com.wisemapping.config.rest.RestAppConfig; import org.springframework.boot.WebApplicationType; @@ -19,8 +21,8 @@ public class Application { new SpringApplicationBuilder() .parent(HibernateConfig.class, ServletConfig.class, CommonConfig.class, SecurityConfig.class).web(WebApplicationType.NONE) -// .child(MvcAppConfig.class, MvcSecurityConfig.class, SecurityConfig.class).web(WebApplicationType.SERVLET) - .child(RestAppConfig.class, ServletConfig.class, InterceptorsConfig.class).web(WebApplicationType.SERVLET) + .child(MvcAppConfig.class, MvcSecurityConfig.class, SecurityConfig.class, InterceptorsConfig.class).web(WebApplicationType.SERVLET) + .sibling(RestAppConfig.class, ServletConfig.class, InterceptorsConfig.class).web(WebApplicationType.SERVLET) .run(args); } diff --git a/wise-webapp/src/main/java/com/wisemapping/config/common/SecurityConfig.java b/wise-webapp/src/main/java/com/wisemapping/config/common/SecurityConfig.java index f0dc3628..ebc3834c 100644 --- a/wise-webapp/src/main/java/com/wisemapping/config/common/SecurityConfig.java +++ b/wise-webapp/src/main/java/com/wisemapping/config/common/SecurityConfig.java @@ -45,7 +45,7 @@ public class SecurityConfig { @Bean public PasswordEncoder passwordEncoder() { - return createDelegatingPasswordEncoder(); + return DefaultPasswordEncoderFactories.createDelegatingPasswordEncoder(); } @Bean diff --git a/wise-webapp/src/main/java/com/wisemapping/security/DefaultPasswordEncoderFactories.java b/wise-webapp/src/main/java/com/wisemapping/security/DefaultPasswordEncoderFactories.java index 5d9d2b2e..d5f81bb1 100644 --- a/wise-webapp/src/main/java/com/wisemapping/security/DefaultPasswordEncoderFactories.java +++ b/wise-webapp/src/main/java/com/wisemapping/security/DefaultPasswordEncoderFactories.java @@ -28,7 +28,7 @@ public class DefaultPasswordEncoderFactories { public static final String ENCODING_ID = "bcrypt"; - static PasswordEncoder createDelegatingPasswordEncoder() { + public static PasswordEncoder createDelegatingPasswordEncoder() { final Map encoders = new HashMap<>(); encoders.put(ENCODING_ID, new BCryptPasswordEncoder(12));