Commit 1fa9b8c2 authored by Quxl's avatar Quxl

x

parent e68f44d9
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.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
......@@ -12,7 +16,12 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
@SpringBootApplication(exclude = { RedisAutoConfiguration.class, RedisRepositoriesAutoConfiguration.class })
public class PDSApplication {
private static Log logger = LogFactory.getLog(PDSApplication.class);
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);
}
......
server:
port: 9090
servlet:
port: 9090
tomcat:
basedir: temp
spring:
profiles:
active: dev
......
......@@ -3,41 +3,18 @@
<include resource="org/springframework/boot/logging/logback/base.xml" />
<appender name="siftingAppender" class="ch.qos.logback.classic.sift.SiftingAppender">
<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">
<FileNamePattern>logs/${context}-%d{yyyy-MM-dd}.log</FileNamePattern>
<MaxHistory>30</MaxHistory>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${CONSOLE_LOG_PATTERN}</pattern>
</encoder>
</appender>
</sift>
<appender name="commonAppender" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<FileNamePattern>logs/system-%d{yyyy-MM-dd}.log</FileNamePattern>
<MaxHistory>30</MaxHistory>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${CONSOLE_LOG_PATTERN}</pattern>
</encoder>
</appender>
<root level="INFO">
<appender-ref ref="siftingAppender" />
<appender-ref ref="commonAppender" />
</root>
<springProfile name="dev">
<root level="INFO">
<appender-ref ref="siftingAppender" />
</root>
</springProfile>
<springProfile name="pro">
<root level="INFO">
<appender-ref ref="siftingAppender" />
</root>
</springProfile>
<logger name="com.egolm" level="DEBUG" />
</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