Make ServletRegistrationBean and FilterRegistration bean generic

Closes gh-7666
This commit is contained in:
Andy Wilkinson
2017-02-09 13:36:35 +00:00
parent a8daed8196
commit df08863641
28 changed files with 222 additions and 185 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -45,10 +45,10 @@ public class SampleAtmosphereApplication {
}
@Bean
public ServletRegistrationBean atmosphereServlet() {
public ServletRegistrationBean<AtmosphereServlet> atmosphereServlet() {
// Dispatcher servlet is mapped to '/home' to allow the AtmosphereServlet
// to be mapped to '/chat'
ServletRegistrationBean registration = new ServletRegistrationBean(
ServletRegistrationBean<AtmosphereServlet> registration = new ServletRegistrationBean<AtmosphereServlet>(
new AtmosphereServlet(), "/chat/*");
registration.addInitParameter("org.atmosphere.cpr.packages", "sample");
registration.addInitParameter("org.atmosphere.interceptor.HeartbeatInterceptor"