diff --git a/spring-boot-samples/spring-boot-sample-atmosphere/src/main/java/sample/atmosphere/SampleAtmosphereApplication.java b/spring-boot-samples/spring-boot-sample-atmosphere/src/main/java/sample/atmosphere/SampleAtmosphereApplication.java index 4f6800bef0..9af08d0c55 100644 --- a/spring-boot-samples/spring-boot-sample-atmosphere/src/main/java/sample/atmosphere/SampleAtmosphereApplication.java +++ b/spring-boot-samples/spring-boot-sample-atmosphere/src/main/java/sample/atmosphere/SampleAtmosphereApplication.java @@ -48,8 +48,10 @@ public class SampleAtmosphereApplication { public ServletRegistrationBean atmosphereServlet() { // Dispatcher servlet is mapped to '/home' to allow the AtmosphereServlet // to be mapped to '/chat' + AtmosphereServlet atmosphereServlet = new AtmosphereServlet(); + atmosphereServlet.framework().setHandlersPath("/"); ServletRegistrationBean registration = new ServletRegistrationBean<>( - new AtmosphereServlet(), "/chat/*"); + atmosphereServlet, "/chat/*"); registration.addInitParameter("org.atmosphere.cpr.packages", "sample"); registration.addInitParameter("org.atmosphere.interceptor.HeartbeatInterceptor" + ".clientHeartbeatFrequencyInSeconds", "10");