mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
Merge pull request #1089 from wenshao/master
fixed bug for monitor web set contentType
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user