Commit 2ec9fc53 authored by 技术部-任文超's avatar 技术部-任文超

Merge branch 'feature/zipkin' into feature/junit_test

parents d3c72629 baa386f8
...@@ -241,7 +241,14 @@ ...@@ -241,7 +241,14 @@
<dependency> <dependency>
<groupId>com.ctrip.framework.apollo</groupId> <groupId>com.ctrip.framework.apollo</groupId>
<artifactId>apollo-client</artifactId> <artifactId>apollo-client</artifactId>
<version>0.10.0</version> <version>0.10.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>cn.quantgroup</groupId>
<artifactId>commons</artifactId>
<version>0.0.5</version>
<scope>compile</scope>
</dependency> </dependency>
<!--<dependency>--> <!--<dependency>-->
<!--<groupId>cn.quantgroup</groupId>--> <!--<groupId>cn.quantgroup</groupId>-->
...@@ -379,7 +386,6 @@ ...@@ -379,7 +386,6 @@
<id>test</id> <id>test</id>
<properties> <properties>
<profiles.activation>test</profiles.activation> <profiles.activation>test</profiles.activation>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>
......
...@@ -10,21 +10,21 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration; ...@@ -10,21 +10,21 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching; import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.ApplicationListener; import org.springframework.context.ApplicationListener;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy; import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.context.annotation.PropertySource; import org.springframework.context.annotation.PropertySource;
import org.springframework.context.event.ContextRefreshedEvent; import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.annotation.EnableAsync;
import cn.quantgroup.tech.shutdown.DefaultSignalHandler;
import sun.misc.Signal;
@ComponentScan(basePackages = {"cn.quantgroup.sms", "cn.quantgroup.xyqb"}) @ComponentScan(basePackages = {"cn.quantgroup.sms", "cn.quantgroup.xyqb"})
@EnableAutoConfiguration @EnableAutoConfiguration
@SpringBootApplication @SpringBootApplication
@EnableCaching @EnableCaching
//@EnableApolloConfig({"application", "tech.msg.sdk", "cash.common"})
@EnableApolloConfig @EnableApolloConfig
@PropertySource(value = {"classpath:application.properties", "classpath:xyqb.properties"}, ignoreResourceNotFound = true)
@Configuration @Configuration
@EnableAspectJAutoProxy @EnableAspectJAutoProxy
@EnableAsync @EnableAsync
...@@ -33,8 +33,7 @@ public class Bootstrap { ...@@ -33,8 +33,7 @@ public class Bootstrap {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication springApplication = new SpringApplication(Bootstrap.class); SpringApplication springApplication = new SpringApplication(Bootstrap.class);
springApplication.addInitializers(new ApolloPropertySourceInitializer("application", "tech.msg.sdk", "cash.common")); springApplication.addInitializers(new ApolloPropertySourceInitializer("application", "tech.msg.sdk", "tech.sleuth", "tech.common", "cash.common"));
springApplication.addListeners(new ApplicationListener<ContextRefreshedEvent>() { springApplication.addListeners(new ApplicationListener<ContextRefreshedEvent>() {
@Override @Override
public void onApplicationEvent(ContextRefreshedEvent event) { public void onApplicationEvent(ContextRefreshedEvent event) {
...@@ -43,7 +42,10 @@ public class Bootstrap { ...@@ -43,7 +42,10 @@ public class Bootstrap {
} }
}); });
springApplication.setRegisterShutdownHook(true); springApplication.setRegisterShutdownHook(true);
springApplication.run(args); ConfigurableApplicationContext run = springApplication.run(args);
log.info("server start..."); log.info("server start...");
// 启用平滑退出功能
Signal.handle(new Signal("INT"), new DefaultSignalHandler(run));
} }
} }
security.sessions=if_required
spring.aop.proxy-target-class=true
<?xml version="1.0" encoding="UTF-8" ?>
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<layout class="ch.qos.logback.classic.PatternLayout">
<pattern>%d{ISO8601} [%thread] [%-5level] %logger - %msg%n</pattern>
</layout>
</appender>
<logger name="com.atomikos" level="warn"/>
<logger name="org.springframework" level="warn"/>
<logger name="org.hibernate" level="warn"/>
<logger name="org.apache" level="warn"/>
<logger name="ch.qos.logback" level="warn"/>
<logger name="feign" level="debug"/>
<root level="info">
<appender-ref ref="STDOUT"/>
</root>
</configuration>
\ No newline at end of file
security.sessions=if_required
spring.aop.proxy-target-class=true
<?xml version="1.0" encoding="UTF-8" ?>
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<layout class="ch.qos.logback.classic.PatternLayout">
<pattern>%d{ISO8601} [%thread] [%-5level] %logger - %msg%n</pattern>
</layout>
</appender>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>/home/quant_group/logs/xyqb_user.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>/home/quant_group/logs/xyqb_user.log.%d{yyyy-MM-dd}</fileNamePattern>
<maxHistory>30</maxHistory>
</rollingPolicy>
<layout class="ch.qos.logback.classic.PatternLayout">
<pattern>%d{ISO8601} [%thread] [%-5level] %logger - %msg%n</pattern>
</layout>
</appender>
<logger name="com.atomikos" level="warn"/>
<logger name="org.springframework" level="warn"/>
<logger name="org.hibernate" level="warn"/>
<logger name="org.apache" level="warn"/>
<logger name="ch.qos.logback" level="warn"/>
<root level="info">
<appender-ref ref="FILE"/>
</root>
</configuration>
\ No newline at end of file
security.sessions=if_required
spring.aop.proxy-target-class=true
configserver.disable=1
configserver.system=xyqb-user
xyqb.data.mysql.jdbc-url=jdbc:mysql://192.168.4.104:3306/xyqb_user?useUnicode=true&characterEncoding=UTF8
xyqb.data.mysql.password=qatest
xyqb.data.mysql.user=qa
xyqb.data.mysql.max-pool-size=20
# CORS
xyqb.filter.allowedOrigin=*
xyqb.filter.allowedHeaders=Origin, No-Cache, x-auth-token, X-Requested-With, If-Modified-Since, Pragma, Last-Modified, Cache-Control, Expires, Content-Type,Authorization
xyqb.data.redis.defaultExpiration=3600
# redis
xyqb.redis.master.host=192.168.4.103
xyqb.redis.master.port=6379
xyqb.redis.master.name=
xyqb.redis.sentinel1.host=
xyqb.redis.sentinel1.port=0
xyqb.redis.sentinel2.host=
xyqb.redis.sentinel2.port=0
xyqb.redis.sentinel3.host=
xyqb.redis.sentinel3.port=0
# 短信平台配置
sms.is.debug=1
# LKB client
lkb.client.url=http://192.168.192.251:8082/LKBClient/openapi
lkb.client.user.register.app=/new/register/registerApp.json
lkb.client.user.update=/new/register/updateUser.json
lkb.client.user.push=/user/push.json
# LKB import
lkb.import.url=http://spider.quantgroup.cn
# LKB
lkb.url=http://192.168.192.251:8081/LKB
# xyqb
xyqb.url=http://192.168.192.206:8999
xyqb.api.url=http://192.168.192.206:9004
# 图形验证码
# 是否启用超级验证码 "__SUPERQG__", 用于测试环境自动化测试, 线上环境可忽略此参数
xyqb.auth.captcha.super.enable=1
#首参数校验
xyqb.fplock.limit.byhour=3
xyqb.fplock.limit.byday=5
#sdk
model.quantgroup.url=http://model.quantgroup.cn
xyqb.auth.url=http://192.168.192.206:9001
usersys.url=http://localhost:9001
xyqb-user.ui=http://192.168.12.40:8080
wechat.appid=wxcdf6077af8127559
wechat.secret=16eaec16084d0d9c52d4114f359cc72c
#xyqb-user-域名
xyqb.user.domain=passport.xyqb.com
xyqb.user.query.url=http://userqry.xyqb.com
xyqb.domain = http://192.168.4.153:7003
#马甲包
loanvest.rabbitmq.connection.virtual-host=/loan_order
#loanvest.rabbitmq.stateMsgQueue=loan_vest_msg_queue
loanvest.rabbitmq.queue=loan_user_queue
loanvest.rabbitmq.exchange=loan_vest_exchange
loanvest.rabbitmq.connection.host=192.168.4.46
loanvest.rabbitmq.connection.port=5672
loanvest.rabbitmq.connection.user=qa
loanvest.rabbitmq.connection.password=qatest
#用户注册广播
register.rabbitmq.connection.virtual-host=/user_register
register.rabbitmq.queue=user_register_queue
register.rabbitmq.exchange=user_register_exchange
register.rabbitmq.connection.host=192.168.4.24
register.rabbitmq.connection.port=5672
register.rabbitmq.connection.user=qa
register.rabbitmq.connection.password=qatest
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<configuration>
<springProperty name="spring.application.name" source="spring.application.name"/>
<property name="LOG_LEVEL_PATTERN" value="%clr(%5p) %clr([${spring.application.name:-},%X{X-B3-TraceId:-},%X{X-B3-SpanId:-},%X{X-Span-Export:-}]){yellow}"/>
<property name="CONSOLE_LOG_PATTERN" value="${CONSOLE_LOG_PATTERN:-%clr(%d{MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%10.10t]){faint} [%40.40file:%4.4line] %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
<!-- 这里面定义了 CONSOLE_LOG_PATTERN, FILE_LOG_PATTERN 等日志格式, 还定义了一些日志级别 -->
<include resource="org/springframework/boot/logging/logback/defaults.xml" />
<include resource="org/springframework/boot/logging/logback/console-appender.xml" />
<logger name="cn.quantgroup" level="DEBUG" />
<logger name="org.springframework" level="INFO" />
<!--<logger name="java.sql.Connection" level="DEBUG"/>-->
<!--<logger name="java.sql.Statement" level="DEBUG"/>-->
<!--<logger name="java.sql.PreparedStatement" level="DEBUG"/>-->
<logger name="org.hibernate" level="warn"/>
<logger name="org.apache" level="warn"/>
<logger name="ch.qos.logback" level="warn"/>
<root level="INFO">
<appender-ref ref="CONSOLE" />
</root>
</configuration>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<configuration> <configuration>
<springProperty name="spring.application.name" source="spring.application.name"/>
<property name="LOG_LEVEL_PATTERN" value="%5p [${spring.application.name:-},%X{X-B3-TraceId:-},%X{X-B3-SpanId:-},%X{X-Span-Export:-}]"/>
<property name="FILE_LOG_PATTERN" value="${FILE_LOG_PATTERN:-%d{yyyy-MM-dd HH:mm:ss.SSS} ${LOG_LEVEL_PATTERN:-%5p} --- [%thread] [%file:%line] %logger - %msg%n}"/>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<layout class="ch.qos.logback.classic.PatternLayout">
<pattern>%d{ISO8601} [%thread] [%-5level] %logger - %msg%n</pattern>
</layout>
</appender>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>/home/quant_group/logs/xyqb_user.log</file> <file>/home/quant_group/logs/${spring.application.name:-application}.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>/home/quant_group/logs/xyqb_user.log.%d{yyyy-MM-dd}</fileNamePattern> <fileNamePattern>/home/quant_group/logs/${spring.application.name:-application}.log.%d{yyyy-MM-dd}</fileNamePattern>
<maxHistory>30</maxHistory> <maxHistory>30</maxHistory>
</rollingPolicy> </rollingPolicy>
<layout class="ch.qos.logback.classic.PatternLayout"> <encoder>
<pattern>%d{ISO8601} [%thread] [%-5level] %logger - %msg%n</pattern> <pattern>${FILE_LOG_PATTERN}</pattern>
</layout> </encoder>
</appender> </appender>
<logger name="com.atomikos" level="warn"/>
<logger name="org.springframework" level="warn"/> <logger name="org.springframework" level="warn"/>
<logger name="org.hibernate" level="warn"/> <logger name="org.hibernate" level="warn"/>
<logger name="org.apache" level="warn"/> <logger name="org.apache" level="warn"/>
...@@ -25,7 +22,6 @@ ...@@ -25,7 +22,6 @@
<root level="info"> <root level="info">
<appender-ref ref="FILE"/> <appender-ref ref="FILE"/>
<!-- <appender-ref ref="STDOUT"/>-->
</root> </root>
</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