Commit 1fa9b8c2 authored by Quxl's avatar Quxl

x

parent e68f44d9
package com.egolm.pds; package com.egolm.pds;
import java.util.TimeZone;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration; import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
...@@ -12,7 +16,12 @@ import org.springframework.transaction.annotation.EnableTransactionManagement; ...@@ -12,7 +16,12 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
@SpringBootApplication(exclude = { RedisAutoConfiguration.class, RedisRepositoriesAutoConfiguration.class }) @SpringBootApplication(exclude = { RedisAutoConfiguration.class, RedisRepositoriesAutoConfiguration.class })
public class PDSApplication { public class PDSApplication {
private static Log logger = LogFactory.getLog(PDSApplication.class);
public static void main(String[] args) { public static void main(String[] args) {
logger.info("JAVA_HOME = " + System.getProperty("java.home"));
System.setProperty("java.io.tmpdir", "temp");
TimeZone.setDefault(TimeZone.getTimeZone("GMT+8"));
SpringApplication.run(PDSApplication.class, args); SpringApplication.run(PDSApplication.class, args);
} }
......
server: server:
servlet:
port: 9090 port: 9090
tomcat:
basedir: temp
spring: spring:
profiles: profiles:
active: dev active: dev
......
...@@ -3,41 +3,18 @@ ...@@ -3,41 +3,18 @@
<include resource="org/springframework/boot/logging/logback/base.xml" /> <include resource="org/springframework/boot/logging/logback/base.xml" />
<appender name="siftingAppender" class="ch.qos.logback.classic.sift.SiftingAppender"> <appender name="commonAppender" class="ch.qos.logback.core.rolling.RollingFileAppender">
<discriminator>
<key>context</key>
<DefaultValue>logback</DefaultValue>
</discriminator>
<sift>
<appender name="rollingFileAppender"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<FileNamePattern>logs/${context}-%d{yyyy-MM-dd}.log</FileNamePattern> <FileNamePattern>logs/system-%d{yyyy-MM-dd}.log</FileNamePattern>
<MaxHistory>30</MaxHistory> <MaxHistory>30</MaxHistory>
</rollingPolicy> </rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${CONSOLE_LOG_PATTERN}</pattern> <pattern>${CONSOLE_LOG_PATTERN}</pattern>
</encoder> </encoder>
</appender> </appender>
</sift>
</appender>
<root level="INFO">
<appender-ref ref="siftingAppender" />
</root>
<springProfile name="dev">
<root level="INFO"> <root level="INFO">
<appender-ref ref="siftingAppender" /> <appender-ref ref="commonAppender" />
</root> </root>
</springProfile>
<springProfile name="pro">
<root level="INFO">
<appender-ref ref="siftingAppender" />
</root>
</springProfile>
<logger name="com.egolm" level="DEBUG" />
</configuration> </configuration>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment