diff options
3 files changed, 9 insertions, 3 deletions
diff --git a/juick-www/src/main/java/com/juick/Application.java b/juick-www/src/main/java/com/juick/Application.java index cb132ae9..586c3e59 100644 --- a/juick-www/src/main/java/com/juick/Application.java +++ b/juick-www/src/main/java/com/juick/Application.java @@ -1,5 +1,9 @@ package com.juick; +import com.juick.server.CommandsManager; +import com.juick.server.XMPPConnection; +import com.juick.server.XMPPServer; +import com.juick.server.xmpp.router.XMPPRouter; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.builder.SpringApplicationBuilder; @@ -19,6 +23,7 @@ public class Application extends SpringBootServletInitializer { } public static void main(String[] args) { - SpringApplication.run(Application.class, args); + SpringApplication.run(new Class[]{ Application.class, XMPPRouter.class, XMPPServer.class, + XMPPConnection.class, CommandsManager.class }, args); } } diff --git a/juick-www/src/main/java/com/juick/www/configuration/WebSecurityConfig.java b/juick-www/src/main/java/com/juick/www/configuration/WebSecurityConfig.java index 909b6cd3..46fa7619 100644 --- a/juick-www/src/main/java/com/juick/www/configuration/WebSecurityConfig.java +++ b/juick-www/src/main/java/com/juick/www/configuration/WebSecurityConfig.java @@ -135,6 +135,6 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter { @Override public void configure(WebSecurity web) throws Exception { web.debug(false); - web.ignoring().antMatchers("/style.css*", "/scripts.js*"); + web.ignoring().antMatchers("/style.css*", "/scripts.js*", "/h2-console"); } } diff --git a/juick-www/src/test/java/com/juick/WebAppTests.java b/juick-www/src/test/java/com/juick/WebAppTests.java index a9eb6926..8c475a62 100644 --- a/juick-www/src/test/java/com/juick/WebAppTests.java +++ b/juick-www/src/test/java/com/juick/WebAppTests.java @@ -74,7 +74,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ @RunWith(SpringRunner.class) @AutoConfigureMockMvc -@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT, classes = {Application.class, XMPPRouter.class, XMPPServer.class, XMPPConnection.class, CommandsManager.class}) +@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT, classes = { Application.class, XMPPRouter.class, XMPPServer.class, + XMPPConnection.class, CommandsManager.class }) public class WebAppTests { @MockBean private ImagesService imagesService; |