Merge pull request #1089 from wenshao/master

fixed bug for monitor web set contentType
This commit is contained in:
wenshao
2016-02-28 23:28:08 +08:00
3 changed files with 19 additions and 1 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ public final class VERSION {
public final static int MajorVersion = 1;
public final static int MinorVersion = 0;
public final static int RevisionVersion = 17;
public final static int RevisionVersion = 18;
public static String getVersionNumber() {
return VERSION.MajorVersion + "." + VERSION.MinorVersion + "." + VERSION.RevisionVersion;
@@ -155,6 +155,10 @@ public abstract class ResourceServlet extends HttpServlet {
IOException {
String filePath = getFilePath(fileName);
if (filePath.endsWith(".html")) {
response.setContentType("text/html; charset=utf-8");
}
if (fileName.endsWith(".jpg")) {
byte[] bytes = Utils.readByteArrayFromResource(filePath);
if (bytes != null) {
@@ -98,6 +98,12 @@ public class WallFilter extends FilterAdapter implements WallFilterMBean {
this.throwException = value;
}
}
{
String tenantColumn = properties.getProperty("druid.wall.tenantColumn");
if (tenantColumn != null) {
this.config.setTenantColumn(tenantColumn);
}
}
}
@Override
@@ -210,6 +216,14 @@ public class WallFilter extends FilterAdapter implements WallFilterMBean {
public void setConfig(WallConfig config) {
this.config = config;
}
public void setTenantColumn(String tenantColumn) {
this.config.setTenantColumn(tenantColumn);
}
public String getTenantColumn() {
return this.config.getTenantColumn();
}
public boolean isInited() {
return inited;