You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I needed to change the log level in the filter in a Spring Boot package, and was initially stymied because I didn't have a web.xml. Here is what allowed me to do this:
@Component
public class MyUrlRewriteFilter extends UrlRewriteFilter {
@Override
public void init(FilterConfig config) throws ServletException {
FilterConfig myConfig = new FilterConfig() {
private final Map<String, String> params = new HashMap<String, String>();
{
params.put("logLevel","DEBUG");
}
@Override
public String getFilterName() {
return "MyUrlRewriteFilter";
}
@Override
public ServletContext getServletContext() {
return config.getServletContext();
}
@Override
public String getInitParameter(String name) {
return params.get(name);
}
@Override
public Enumeration<String> getInitParameterNames() {
return Collections.enumeration(params.keySet());
}
};
super.init(myConfig);
}
}
The text was updated successfully, but these errors were encountered:
I needed to change the log level in the filter in a Spring Boot package, and was initially stymied because I didn't have a web.xml. Here is what allowed me to do this:
The text was updated successfully, but these errors were encountered: