forked from p81075629/datagear
[web]配置文件由WEB-INF/confg改为src/main/resources目录下,因为它们都不是用户可编辑的
This commit is contained in:
parent
ff4be1193a
commit
5077b9353e
|
@ -14,7 +14,7 @@
|
|||
<packaging>war</packaging>
|
||||
|
||||
<properties>
|
||||
<dist.log4j.rootLogger>DEBUG, A1</dist.log4j.rootLogger>
|
||||
<dist.log4j.rootLogger>INFO, A1</dist.log4j.rootLogger>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
@ -156,8 +156,7 @@
|
|||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<version>1.4</version>
|
||||
<executions>
|
||||
|
||||
<!-- 打包前将log4j由DEBUG改为ERROR,打包后恢复为DEBUG -->
|
||||
<!-- 打包前修改log4j的日志设置 -->
|
||||
<execution>
|
||||
<id>updateLog4jLevelToError</id>
|
||||
<phase>prepare-package</phase>
|
||||
|
@ -166,24 +165,11 @@
|
|||
</goals>
|
||||
<configuration>
|
||||
<tasks>
|
||||
<replace file="src/main/webapp/WEB-INF/config/log4j.properties"
|
||||
<replace file="${project.build.outputDirectory}/log4j.properties"
|
||||
token="DEBUG, A0" value="${dist.log4j.rootLogger}" />
|
||||
</tasks>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>resetLog4jLevelToDebug</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<tasks>
|
||||
<replace file="src/main/webapp/WEB-INF/config/log4j.properties"
|
||||
token="${dist.log4j.rootLogger}" value="DEBUG, A0" />
|
||||
</tasks>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<bean id="propertyConfigurer"
|
||||
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
|
||||
<property name="location">
|
||||
<value>/WEB-INF/config/datagear.properties</value>
|
||||
<value>classpath:datagear.properties</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ log4j.appender.A0.layout.ConversionPattern=[%d{yyyy-MM-dd HH:mm:ss,SSS}] [%p] %-
|
|||
|
||||
#==============appender 1==========================
|
||||
log4j.appender.A1=org.apache.log4j.RollingFileAppender
|
||||
log4j.appender.A1.File=logs/datagear.log
|
||||
log4j.appender.A1.File=logs/datagear/datagear.log
|
||||
log4j.appender.A1.MaxFileSize=5120KB
|
||||
log4j.appender.A1.MaxBackupIndex=20
|
||||
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
|
|
@ -13,7 +13,7 @@
|
|||
</context-param>
|
||||
<context-param>
|
||||
<param-name>log4jConfigLocation</param-name>
|
||||
<param-value>/WEB-INF/config/log4j.properties</param-value>
|
||||
<param-value>classpath:log4j.properties</param-value>
|
||||
</context-param>
|
||||
<listener>
|
||||
<listener-class>org.springframework.web.util.Log4jConfigListener
|
||||
|
|
Loading…
Reference in New Issue