Skip to content

Commit

Permalink
修复png图片不能访问直接404的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
chocotan committed Nov 23, 2014
1 parent 800112a commit e08c3cd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 17 deletions.
14 changes: 1 addition & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.loli</groupId>
<artifactId>lolibox</artifactId>
<version>0.0.3-RELEASE</version>
<version>0.0.4-SNAPSHOT</version>
<packaging>war</packaging>
<url>https://github.com/chocotan/lolibox</url>
<name>Lolibox</name>
Expand Down Expand Up @@ -57,23 +57,11 @@
</scm>

<dependencies>
<!-- 阿里云oss -->
<dependency>
<groupId>io.loli.storage</groupId>
<artifactId>sdk-aliyun</artifactId>
<version>0.0.8-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>io.loli</groupId>
<artifactId>util</artifactId>
<version>0.0.13</version>
</dependency>
<dependency>
<groupId>com.qiniu</groupId>
<artifactId>sdk</artifactId>
<version>6.1.0</version>
</dependency>

<dependency>
<groupId>javax.ws.rs</groupId>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/loli/box/startup/LoliBoxAppConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public LoliBoxAppConfig() {
this.packages(packages).register(MultiPartFeature.class).register(JsonProcessingFeature.class)
.property(JsonGenerator.PRETTY_PRINTING, true).register(LoggingFilter.class).register(JspMvcFeature.class)
.property(JspMvcFeature.TEMPLATES_BASE_PATH, "/WEB-INF/jsp").register(RequestContextFilter.class)
.property(ServletProperties.FILTER_STATIC_CONTENT_REGEX, "/.*(js|css|swf|ico|png)(\\?.*)*");
.property(ServletProperties.FILTER_STATIC_CONTENT_REGEX, "/static/.*(js|css|swf|ico|png)(\\?.*)*");
// .property(ServerProperties.TRACING, TracingConfig.ALL.name())

}
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/io/loli/box/startup/LoliBoxConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ public class LoliBoxConfig {
pathFile.mkdir();
} else {
if (pathFile.isFile()) {
log.warning(savePath + " 不是一个正确的文件夹,请检查,lolibox即将退出");
log.warning(savePath + " 不是一个正确的文件夹,请检查");
} else {
if (pathFile.canWrite()) {
log.warning(savePath + "不可写,lolibox即将退出");
if (!pathFile.canWrite()) {
log.warning(savePath + "不可写");
}
}
}
Expand Down

0 comments on commit e08c3cd

Please sign in to comment.