|
@@ -46,7 +46,7 @@ public class URuleServlet extends HttpServlet{
|
|
|
@Override
|
|
@Override
|
|
|
public void init(ServletConfig config) throws ServletException {
|
|
public void init(ServletConfig config) throws ServletException {
|
|
|
super.init(config);
|
|
super.init(config);
|
|
|
- WebApplicationContext applicationContext=WebApplicationContextUtils.getWebApplicationContext(config.getServletContext());
|
|
|
|
|
|
|
+ WebApplicationContext applicationContext=getWebApplicationContext(config);
|
|
|
Collection<ServletHandler> handlers=applicationContext.getBeansOfType(ServletHandler.class).values();
|
|
Collection<ServletHandler> handlers=applicationContext.getBeansOfType(ServletHandler.class).values();
|
|
|
for(ServletHandler handler:handlers){
|
|
for(ServletHandler handler:handlers){
|
|
|
String url=handler.url();
|
|
String url=handler.url();
|
|
@@ -57,6 +57,10 @@ public class URuleServlet extends HttpServlet{
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ protected WebApplicationContext getWebApplicationContext(ServletConfig config){
|
|
|
|
|
+ return WebApplicationContextUtils.getWebApplicationContext(config.getServletContext());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
|
|
protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
|
|
|
RequestHolder.set(req, resp);
|
|
RequestHolder.set(req, resp);
|