diff options
author | Vitaly Takmazov | 2016-07-19 16:20:03 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-07-19 16:20:03 +0300 |
commit | 34d1411d80ce18807448e97ce21062122a9afaae (patch) | |
tree | e020bbf77e8baa001d976661fbea36de2556ba57 /juick-ws/src/main/java/com/juick/ws/configuration | |
parent | 7f80c591731625c5c2c7219a267bda1630634d7c (diff) |
juick-ws: add status page
Diffstat (limited to 'juick-ws/src/main/java/com/juick/ws/configuration')
-rw-r--r-- | juick-ws/src/main/java/com/juick/ws/configuration/WebsocketConfiguration.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/juick-ws/src/main/java/com/juick/ws/configuration/WebsocketConfiguration.java b/juick-ws/src/main/java/com/juick/ws/configuration/WebsocketConfiguration.java index 223f8d63..fbc6226b 100644 --- a/juick-ws/src/main/java/com/juick/ws/configuration/WebsocketConfiguration.java +++ b/juick-ws/src/main/java/com/juick/ws/configuration/WebsocketConfiguration.java @@ -10,7 +10,10 @@ import org.springframework.core.env.Environment; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.datasource.DriverManagerDataSource; import org.springframework.web.servlet.config.annotation.EnableWebMvc; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport; import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; +import org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping; +import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping; import org.springframework.web.socket.config.annotation.EnableWebSocket; import org.springframework.web.socket.config.annotation.WebSocketConfigurer; import org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry; @@ -23,11 +26,10 @@ import java.util.concurrent.Executors; * Created by vitalyster on 28.06.2016. */ @Configuration -@EnableWebMvc @EnableWebSocket @ComponentScan(basePackages = {"com.juick"}) @PropertySource("classpath:juick.conf") -public class WebsocketConfiguration extends WebMvcConfigurerAdapter implements WebSocketConfigurer { +public class WebsocketConfiguration extends WebMvcConfigurationSupport implements WebSocketConfigurer { @Inject Environment env; ExecutorService xmppThread = Executors.newSingleThreadExecutor(); @@ -49,6 +51,12 @@ public class WebsocketConfiguration extends WebMvcConfigurerAdapter implements W return new JdbcTemplate(dataSource); } @Override + public RequestMappingHandlerMapping requestMappingHandlerMapping() { + RequestMappingHandlerMapping mapping = super.requestMappingHandlerMapping(); + mapping.setUseSuffixPatternMatch(false); + return mapping; + } + @Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { registry.addHandler(wsHandler(), "/**").setAllowedOrigins("*"); } |