Skip to content

Commit

Permalink
当druid与spring boot配合使用时,会出现druid监控的servlet不能很好的配合浏览器工作 alibaba#952
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaohaolin committed Oct 29, 2015
1 parent 1c890ed commit c5ce45e
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ public ResourceSerlvet(String resourcePath){
this.resourcePath = resourcePath;
}

public void init() throws ServletException {
@Override
public void init() throws ServletException {
initAuthEnv();
}

Expand Down Expand Up @@ -182,11 +183,14 @@ protected void returnResourceFile(String fileName, String uri, HttpServletRespon
response.setContentType("text/css;charset=utf-8");
} else if (fileName.endsWith(".js")) {
response.setContentType("text/javascript;charset=utf-8");
}else if (fileName.endsWith(".html")) {
response.setContentType("text/html;charset=utf-8");
}
response.getWriter().write(text);
}

public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
@Override
public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String contextPath = request.getContextPath();
String servletPath = request.getServletPath();
String requestURI = request.getRequestURI();
Expand Down

0 comments on commit c5ce45e

Please sign in to comment.