Commit 8051ad1f by 吴学德

基础框架

parents
<<<<<<< HEAD
# ��Ŀ�������
/gdtel-gztel-jyyy-core-service/target/
/gdtel-gztel-jyyy-eureka/target/
/gdtel-gztel-jyyy-gateway/target/
/gdtel-gztel-jyyy-service-manager/target/
/gdtel-gztel-jyyy-task/target/
/logs/
# Compiled class file
*.class
*.iml
*.idea
target/
logs/
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
*velocity.log*
# Eclipse #
.classpath
.project
.settings/
.DS_Store
_dockerCerts/
=======
# 项目相关文件�?/wisnun-order/
/gdtel-gztel-jyyy-core-service/target/
/gdtel-gztel-jyyy-eureka/target/
/gdtel-gztel-jyyy-gateway/target/
/gdtel-gztel-jyyy-service-manager/target/
/gdtel-gztel-jyyy-task/target/
/logs/
# Compiled class file
*.class
*.iml
*.idea
target/
logs/
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
*velocity.log*
# Eclipse #
.classpath
.project
.settings/
.DS_Store
_dockerCerts/
>>>>>>> 9e84a784abacf3ac6c68078b4e35c8f869dae6ca
.factorypath
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>gdtel-gztel-school-center</artifactId>
<groupId>com.winsun.gdtel.gztel</groupId>
<version>0.0.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
<artifactId>gdtel-gztel-jyyy-core-service</artifactId>
<version>0.0.1</version>
<dependencies>
<!-- 为了节省内存,改用jetty -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<!-- 去除默认tomcat配置 -->
<exclusion>
<artifactId>spring-boot-starter-tomcat</artifactId>
<groupId>org.springframework.boot</groupId>
</exclusion>
<!-- 去除默认日志配置 -->
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
<!-- 为了节省内存,改用jetty -->
<dependency>
<groupId>com.winsun.framework</groupId>
<artifactId>winsun-core-common</artifactId>
</dependency>
<dependency>
<groupId>com.winsun.framework</groupId>
<artifactId>winsun-core-service</artifactId>
</dependency>
<!--<dependency>
<groupId>com.winsun.framework</groupId>
<artifactId>winsun-utils-redis</artifactId>
</dependency>-->
<dependency>
<artifactId>p6spy</artifactId>
<groupId>p6spy</groupId>
</dependency>
<dependency>
<artifactId>druid-spring-boot-starter</artifactId>
<groupId>com.alibaba</groupId>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>gdtel-gztel-jyyy-core-service</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork><!-- 如果没有该项配置,可能devtools不会起作用,即应用不会restart -->
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.5</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/webapp</directory>
</resource>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
</resources>
</build>
</project>
\ No newline at end of file
package com.winsun;
import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
import com.winsun.item.core.common.constant.Const;
import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
/**
* SpringBoot方式启动类
*
* @author winsun
* @Date 2017/5/21 12:06
*/
@EnableEurekaClient
@SpringBootApplication(exclude = {DruidDataSourceAutoConfigure.class})
@EnableCaching
@RefreshScope
@EnableFeignClients
@MapperScan(basePackages = {"com.winsun.item.modular.*.dao","com.winsun.mapper"})
public class WinsunCoreServiceApplication {
private final static Logger logger = LoggerFactory.getLogger(WinsunCoreServiceApplication.class);
public static void main(String[] args) {
System.setProperty("jasypt.encryptor.password", Const.JASYPT_ENCRYPTOR_PASSWORD);
SpringApplication.run(WinsunCoreServiceApplication.class, args);
logger.info("{} is success!", WinsunCoreServiceApplication.class.getName());
}
}
package com.winsun;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
/**
* Guns Web程序启动类
*
* @author fengshuonan
* @date 2017-05-21 9:43
*/
public class WinsunServletInitializer extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return builder.sources(WinsunCoreServiceApplication.class);
}
}
eureka:
instance:
hostname: eureka
prefer-ip-address: true
instance-id: ${spring.application.name}:${spring.cloud.client.ipAddress}:${spring.application.instance_id:${server.port}}
# 心跳时间,即服务续约间隔时间(缺省为30s)
lease-renewal-interval-in-seconds: 10
# 发呆时间,即服务续约到期时间(缺省为90s)
lease-expiration-duration-in-seconds: 20
client:
registry-fetch-interval-seconds: 5
serviceUrl:
defaultZone: http://eureka:20000/eureka/
server:
port: 10002
servlet:
context-path: /ciop
tomcat:
uri-encoding: UTF-8
max-threads: 200
max-connections: 2000
winsun:
app:
version: @project.version@
name: ${spring.application.name}
scanner: false
#是否开启swagger (true/false)
swagger-open: true
#是否开启登录时验证码 (true/false)
kaptcha-open: false
#是否开启spring session,如果是多机环境需要开启(true/false)
spring-session-open: false
redis-session-expire: 86400
#session失效时间(只在单机环境下生效,多机环境在SpringSessionConfig类中配置) 单位:秒
session-invalidate-time: 86400
#多久检测一次失效的session(只在单机环境下生效) 单位:秒
session-validation-interval: 43200
spring:
profiles:
active: dev
cloud:
stream:
bindings:
menuInput:
#要和output的destination一致, 这样才能将队列和写入消息的exchange关联起来
destination: queue.menu.messages
binder: local_rabbit
group: menuMessageConsumers
content-type: application/json
binders:
local_rabbit:
type: rabbit
environment:
spring:
rabbitmq:
host: ${spring.rabbitmq.host}
prot: ${spring.rabbitmq.port}
password: ${spring.rabbitmq.username}
username: ${spring.rabbitmq.password}
rabbit:
bindings:
input:
consumer:
# maxumum concurrency of this consumer (threads)
max-concurrency: 50
# number of prefetched messages pre consumer thread
prefetch: 100
# true to requeue rejected messages, false to discard (or route to DLQ)
requeue-rejected: false
# republish failures to the DLQ with diagnostic headers
republish-to-dlq: true
rabbitmq:
host: jyyy-rabbitmq
port: 5672
username: guest
password: guest
redis:
clusterWhether: false
cluster:
max-redirects: 3
nodes:
- jyyy-redis:6379
database: 0
host: jyyy-redis
port: 6379
password:
lettuce:
pool:
max-active: -1
max-wait: -1
max-idle: 8
min-idle: 0
timeout: 5000
ip:
exprie: 600
prohibition: 600
datasource:
url: jdbc:mysql://172.18.101.171:3306/dzqd?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&allowPublicKeyRetrieval=true
username: root
password: AMrGBg6ZSsRrDLs6
#用来搜集数据库的所有表
db-name: guns
filters: wall,mergeStat
driver-class-name: com.mysql.cj.jdbc.Driver
max-active: 20
dynamic:
primary: master
p6spy: true
druid:
filters: stat
datasource:
master:
url: ${spring.datasource.url}
username: ${spring.datasource.username}
password: ${spring.datasource.password}
driver-class-name: ${spring.datasource.driver-class-name}
max-active: ${spring.datasource.max-active}
syh:
url: jdbc:mysql://132.122.4.73:33060/contactcenter?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&allowPublicKeyRetrieval=true
username: yhzx
password: yhzx@160505
driver-class-name: com.mysql.cj.jdbc.Driver
devtools:
restart:
enabled: false
additional-paths: src/main/java
exclude: static/**,WEB-INF/view/**
servlet:
multipart:
enabled: true
max-request-size: 100MB
max-file-size: 100MB
application:
name: core
mybatis-plus:
typeAliasesPackage: com.winsun.auth.model.common,com.winsun.auth.model.merchant,com.winsun.auth.model.user,com.winsun.auth.core.node
mapper-locations:
- /com/winsun/item/modular/system/dao/mapping/*.xml
management:
endpoints:
web:
exposure:
include: bus-refresh
messageconfig:
url: "https://fnsms.mini189.cn/smsapi/sendsms"
user: "jyyy"
pwt: "ll987!!ali5c8"
channel: "yb"
phoneRule:
enabled: true
rule: "133, 149, 153, 173, 177, 180, 181, 189, 191, 199"
\ No newline at end of file
eureka:
instance:
hostname: eureka
prefer-ip-address: true
instance-id: ${spring.application.name}:${spring.cloud.client.ipAddress}:${spring.application.instance_id:${server.port}}
# 心跳时间,即服务续约间隔时间(缺省为30s)
lease-renewal-interval-in-seconds: 10
# 发呆时间,即服务续约到期时间(缺省为90s)
lease-expiration-duration-in-seconds: 20
client:
registry-fetch-interval-seconds: 5
serviceUrl:
defaultZone: http://eureka:20000/eureka/
server:
port: 10002
servlet:
context-path: /ciop
tomcat:
uri-encoding: UTF-8
max-threads: 200
max-connections: 2000
winsun:
app:
version: @project.version@
name: ${spring.application.name}
scanner: false
#是否开启swagger (true/false)
swagger-open: true
#是否开启登录时验证码 (true/false)
kaptcha-open: false
#是否开启spring session,如果是多机环境需要开启(true/false)
spring-session-open: false
redis-session-expire: 86400
#session失效时间(只在单机环境下生效,多机环境在SpringSessionConfig类中配置) 单位:秒
session-invalidate-time: 86400
#多久检测一次失效的session(只在单机环境下生效) 单位:秒
session-validation-interval: 43200
spring:
profiles:
active: prod
cloud:
stream:
bindings:
menuInput:
#要和output的destination一致, 这样才能将队列和写入消息的exchange关联起来
destination: queue.menu.messages
binder: local_rabbit
group: menuMessageConsumers
content-type: application/json
binders:
local_rabbit:
type: rabbit
environment:
spring:
rabbitmq:
host: ${spring.rabbitmq.host}
port: ${spring.rabbitmq.port}
password: ${spring.rabbitmq.username}
username: ${spring.rabbitmq.password}
rabbit:
bindings:
input:
consumer:
# maxumum concurrency of this consumer (threads)
max-concurrency: 50
# number of prefetched messages pre consumer thread
prefetch: 100
# true to requeue rejected messages, false to discard (or route to DLQ)
requeue-rejected: false
# republish failures to the DLQ with diagnostic headers
republish-to-dlq: true
rabbitmq:
host: rabbitmq
port: 5672
username: guest
password: guest
redis:
clusterWhether: false
cluster:
max-redirects: 3
nodes:
- redis:6379
database: 0
host: redis
port: 6379
password: QpUd11WzsuBV3RZd
lettuce:
pool:
max-active: -1
max-wait: -1
max-idle: 8
min-idle: 0
timeout: 5000
ip:
exprie: 600
prohibition: 600
datasource:
url: jdbc:mysql://172.18.101.171:3306/dzqd?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&allowPublicKeyRetrieval=true
username: root
password: AMrGBg6ZSsRrDLs6
#用来搜集数据库的所有表
db-name: guns
filters: wall,mergeStat
driver-class-name: com.mysql.cj.jdbc.Driver
max-active: 20
dynamic:
primary: master
p6spy: true
druid:
filters: stat
datasource:
master:
url: ${spring.datasource.url}
username: ${spring.datasource.username}
password: ${spring.datasource.password}
driver-class-name: ${spring.datasource.driver-class-name}
max-active: ${spring.datasource.max-active}
syh:
url: jdbc:mysql://132.122.4.73:33060/contactcenter?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&allowPublicKeyRetrieval=true
username: yhzx
password: yhzx@160505
driver-class-name: com.mysql.cj.jdbc.Driver
devtools:
restart:
enabled: false
additional-paths: src/main/java
exclude: static/**,WEB-INF/view/**
servlet:
multipart:
enabled: true
max-request-size: 100MB
max-file-size: 100MB
application:
name: core
mybatis-plus:
typeAliasesPackage: com.winsun.auth.model.common,com.winsun.auth.model.merchant,com.winsun.auth.model.user,com.winsun.auth.core.node
mapper-locations:
- /com/winsun/item/modular/system/dao/mapping/*.xml
management:
endpoints:
web:
exposure:
include: bus-refresh
messageconfig:
url: "https://fnsms.mini189.cn/smsapi/sendsms"
user: "jyyy"
pwt: "ll987!!ali5c8"
channel: "yb"
phoneRule:
enabled: true
rule: "133, 149, 153, 173, 177, 180, 181, 189, 191, 199"
\ No newline at end of file
eureka:
instance:
hostname: localhost
# 心跳时间,即服务续约间隔时间(缺省为30s)
lease-renewal-interval-in-seconds: 10
# 发呆时间,即服务续约到期时间(缺省为90s)
lease-expiration-duration-in-seconds: 20
client:
registry-fetch-interval-seconds: 5
serviceUrl:
defaultZone: http://localhost:20000/eureka/
server:
port: 10002
servlet:
context-path: /ciop
tomcat:
uri-encoding: UTF-8
max-threads: 200
max-connections: 2000
winsun:
app:
version: @project.version@
name: ${spring.application.name}
scanner: false
#是否开启swagger (true/false)
swagger-open: true
#是否开启登录时验证码 (true/false)
kaptcha-open: false
#是否开启spring session,如果是多机环境需要开启(true/false)
spring-session-open: true
redis-session-expire: 86400
#session失效时间(只在单机环境下生效,多机环境在SpringSessionConfig类中配置) 单位:秒
session-invalidate-time: 86400
#多久检测一次失效的session(只在单机环境下生效) 单位:秒
session-validation-interval: 43200
spring:
profiles:
active: local
cloud:
stream:
bindings:
menuInput:
destination: queue.menu.messages #要和output的destination一致, 这样才能将队列和写入消息的exchange关联起来
binder: local_rabbit
group: menuMessageConsumers
content-type: application/json
binders:
local_rabbit:
type: rabbit
environment:
spring:
rabbitmq:
host: ${spring.rabbitmq.host}
port: ${spring.rabbitmq.port}
username: ${spring.rabbitmq.username}
password: ${spring.rabbitmq.password}
rabbit:
bindings:
input:
consumer:
# maxumum concurrency of this consumer (threads)
max-concurrency: 50
# number of prefetched messages pre consumer thread
prefetch: 100
# true to requeue rejected messages, false to discard (or route to DLQ)
requeue-rejected: false
# republish failures to the DLQ with diagnostic headers
republish-to-dlq: true
rabbitmq:
host: localhost
port: 5672
username: guest
password: guest
redis:
clusterWhether: false
cluster:
max-redirects: 3
nodes:
- localhost:6379
database: 0
host: localhost
port: 6379
password:
lettuce:
pool:
max-active: -1
max-wait: -1
max-idle: 8
min-idle: 0
timeout: 5000
ip:
exprie: 600
prohibition: 600
datasource:
# 由于父框架的问题,这里本来不应该这样写的
url: jdbc:mysql://172.18.101.171:3306/ws_project?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&allowPublicKeyRetrieval=true
username: root
password: AMrGBg6ZSsRrDLs6
db-name: guns #用来搜集数据库的所有表
filters: wall,mergeStat
driver-class-name: com.mysql.cj.jdbc.Driver
max-active: 20
dynamic:
primary: master
p6spy: true
druid:
filters: stat
datasource:
master:
url: ${spring.datasource.url}
username: ${spring.datasource.username}
password: ${spring.datasource.password}
driver-class-name: ${spring.datasource.driver-class-name}
max-active: ${spring.datasource.max-active}
devtools:
restart:
enabled: false
additional-paths: src/main/java
exclude: static/**,WEB-INF/view/**
servlet:
multipart:
enabled: true
max-request-size: 100MB
max-file-size: 100MB
application:
name: core
mybatis-plus:
typeAliasesPackage: com.winsun.auth.model.common,com.winsun.auth.model.merchant,com.winsun.auth.model.user,com.winsun.auth.core.node
mapper-locations:
- /com/winsun/item/modular/system/dao/mapping/*.xml
- /com/winsun/modular/dao/mapping/*.xml
management:
endpoints:
web:
exposure:
include: bus-refresh
feign:
hystrix:
enabled: true
httpclient:
enabled: true
okhttp:
enabled: false
ribbon:
MaxAutoRetries: 0
MaxAutoRetriesNextServer: 0
ReadTimeout: 4400
ConnectTimeout: 2000
hystrix:
threadpool:
default:
coreSize: 100
maximumSize: 100
allowMaximumSizeToDivergeFromCoreSize: true
maxQueueSize: 20000
queueSizeRejectionThreshold: 19999
command:
default: #default全局有效,service id指定应用有效
circuitBreaker:
enabled: false
execution:
timeout:
#如果enabled设置为false,则请求超时交给ribbon控制,为true,则超时作为熔断根据
enabled: true
isolation:
thread:
timeoutInMilliseconds: 4500 #断路器超时时间,默认1000ms
messageconfig:
url: "https://fnsms.mini189.cn/smsapi/sendsms"
user: "jyyy"
pwt: "ll987!!ali5c8"
channel: "yb"
phoneRule:
enabled: true
rule: "133, 149, 153, 173, 177, 180, 181, 189, 191, 199"
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="ehcache.xsd"
updateCheck="false" monitoring="autodetect"
dynamicConfig="true">
<diskStore path="java.io.tmpdir/ehcache"/>
<defaultCache
maxElementsInMemory="50000"
eternal="false"
timeToIdleSeconds="3600"
timeToLiveSeconds="3600"
overflowToDisk="true"
diskPersistent="false"
diskExpiryThreadIntervalSeconds="120"
/>
<!-- 全局变量:永不过期-->
<cache name="CONSTANT"
maxElementsInMemory="50000"
eternal="true"
clearOnFlush="false"
overflowToDisk="true"
diskSpoolBufferSizeMB="1024"
maxElementsOnDisk="100000"
diskPersistent="false"
diskExpiryThreadIntervalSeconds="120"
memoryStoreEvictionPolicy="LFU"
transactionalMode="off">
</cache>
</ehcache>
<!--
maxElementsInMemory="10000" //Cache中最多允许保存的数据对象的数量
external="false" //缓存中对象是否为永久的,如果是,超时设置将被忽略,对象从不过期
timeToLiveSeconds="3600" //缓存的存活时间,从开始创建的时间算起
timeToIdleSeconds="3600" //多长时间不访问该缓存,那么ehcache 就会清除该缓存
这两个参数很容易误解,看文档根本没用,我仔细分析了ehcache的代码。结论如下:
1、timeToLiveSeconds的定义是:以创建时间为基准开始计算的超时时长;
2、timeToIdleSeconds的定义是:在创建时间和最近访问时间中取出离现在最近的时间作为基准计算的超时时长;
3、如果仅设置了timeToLiveSeconds,则该对象的超时时间=创建时间+timeToLiveSeconds,假设为A;
4、如果没设置timeToLiveSeconds,则该对象的超时时间=min(创建时间,最近访问时间)+timeToIdleSeconds,假设为B;
5、如果两者都设置了,则取出A、B最少的值,即min(A,B),表示只要有一个超时成立即算超时。
overflowToDisk="true" //内存不足时,是否启用磁盘缓存
diskSpoolBufferSizeMB //设置DiskStore(磁盘缓存)的缓存区大小。默认是30MB。每个Cache都应该有自己的一个缓冲区
maxElementsOnDisk //硬盘最大缓存个数
diskPersistent //是否缓存虚拟机重启期数据The default value is false
diskExpiryThreadIntervalSeconds //磁盘失效线程运行时间间隔,默认是120秒。
memoryStoreEvictionPolicy="LRU" //当达到maxElementsInMemory限制时,Ehcache将会根据指定的策略去清理内存。默认策略是LRU(最近最少使用)。你可以设置为FIFO(先进先出)或是LFU(较少使用)。
clearOnFlush //内存数量最大时是否清除
maxEntriesLocalHeap="0" //堆内存中最大缓存对象数,0没有限制
maxEntriesLocalDisk="1000" //硬盘最大缓存个数。
-->
<?xml version="1.0" encoding="UTF-8"?>
<!-- RollingRandomAccessFile的属性:
fileName 指定当前日志文件的位置和文件名称
filePattern 指定当发生Rolling时,文件的转移和重命名规则
SizeBasedTriggeringPolicy 指定当文件体积大于size指定的值时,触发Rolling
DefaultRolloverStrategy 指定最多保存的文件个数
TimeBasedTriggeringPolicy 这个配置需要和filePattern结合使用,
注意filePattern中配置的文件重命名规则是${FILE_NAME}-%d{yyyy-MM-dd HH-mm}-%i,最小的时间粒度是mm,即分钟,
TimeBasedTriggeringPolicy指定的size是1,结合起来就是每1分钟生成一个新文件。
如果改成%d{yyyy-MM-dd HH},最小粒度为小时,则每一个小时生成一个文件。 -->
<Configuration status="off" monitorInterval="30">
<properties>
<property name="log_path">logs</property>
</properties>
<Appenders>
<!-- <NoSql name="databaseAppender">
<MongoDb databaseName="db_cloud_device" collectionName="extract-invoice_log"
server="127.0.0.1" port="27017" userName="gzds" password="Gzds1130" />
</NoSql> -->
<!-- 打印台 -->
<Console name="Console" target="SYSTEM_OUT">
<!--控制台只输出level及以上级别的信息-->
<PatternLayout pattern="%date{yyyy-MM-dd HH:mm:ss} %level [%file:%line] - %msg%n"/>
</Console>
<RollingRandomAccessFile name="InfoFile"
fileName="${log_path}/info/info.log"
filePattern="${log_path}/info/info-%d{yyyy-MM-dd}-%i.log">
<Filters>
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="%date{yyyy-MM-dd HH:mm:ss} %level [%file:%line] - %msg%n"/>
<Policies>
<!-- 归档每天的文件 -->
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<!-- 限制单个文件大小 -->
<SizeBasedTriggeringPolicy size="20 MB"/>
</Policies>
<DefaultRolloverStrategy max="30"/>
</RollingRandomAccessFile>
<RollingRandomAccessFile name="WarnFile"
fileName="${log_path}/warn/warn.log"
filePattern="${log_path}/error/error-%d{yyyy-MM-dd}-%i.log">
<Filters>
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="%date{yyyy-MM-dd_HH:mm:ss} %level [%file:%line] - %msg%n"/>
<Policies>
<!-- 归档每天的文件 -->
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<!-- 限制单个文件大小 -->
<SizeBasedTriggeringPolicy size="20 MB"/>
</Policies>
<DefaultRolloverStrategy max="30"/>
</RollingRandomAccessFile>
<RollingRandomAccessFile name="ErrorFile"
fileName="${log_path}/error/error.log"
filePattern="${log_path}/error/error-%d{yyyy-MM-dd}-%i.log">
<Filters>
<ThresholdFilter level="fatal" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="%date{yyyy-MM-dd_HH:mm:ss} %level [%file:%line] - %msg%n"/>
<Policies>
<!-- 归档每天的文件 -->
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<!-- 限制单个文件大小 -->
<SizeBasedTriggeringPolicy size="20 MB"/>
</Policies>
<DefaultRolloverStrategy max="30"/>
</RollingRandomAccessFile>
</Appenders>
<Loggers>
<Root level="info">
<appender-ref ref="Console"/>
<appender-ref ref="InfoFile"/>
<appender-ref ref="WarnFile"/>
<appender-ref ref="ErrorFile"/>
</Root>
</Loggers>
</Configuration>
\ No newline at end of file
package com.winsun.base;
import com.winsun.WinsunCoreServiceApplication;
import lombok.extern.slf4j.Slf4j;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
/**
* @author Liph
* @datetime 2020-01-20/1/9 09:50
*/
@Slf4j
@SpringBootTest(classes = WinsunCoreServiceApplication.class)
@RunWith(SpringRunner.class)
public abstract class AppApplicationBaseIT {
/**
* BeforeClass
*/
@BeforeClass
public static void beforeClass() {
log.info("beforeClass.........................");
}
/**
* AfterClass
*/
@AfterClass
public static void afterClass() {
log.info("afterClass.........................");
}
}
package com.winsun.user;
import com.winsun.auth.core.common.model.ResponseData;
import com.winsun.auth.model.user.User;
import com.winsun.base.AppApplicationBaseIT;
import com.winsun.item.modular.system.dao.UserMapper;
import com.winsun.item.util.LoginUtils;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
/**
* 用户测试
* @author Liph
* @datetime 2020-01-20/1/9 09:43
*/
@Slf4j
public class UserTestHelper extends AppApplicationBaseIT {
@Autowired
private UserMapper mapper;
@Test
public void decryptPwd() {
final String account = "18028801118";
User user = mapper.getByAccount(account);
if(user == null) {
throw new NullPointerException("解密用户信息失败,用户不存在");
}
log.info(user.getPassword());
// 证明MD5无法解密
ResponseData<String> pwdDecrypt = LoginUtils.pwdDecrypt(user.getPassword());
log.info("{}", pwdDecrypt.getData());
}
}
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>gdtel-gztel-school-center</artifactId>
<groupId>com.winsun.gdtel.gztel</groupId>
<version>0.0.2</version>
</parent>
<artifactId>gdtel-gztel-jyyy-eureka</artifactId>
<version>0.0.1</version>
<dependencies>
<dependency>
<groupId>com.winsun.framework</groupId>
<artifactId>winsun-eureka</artifactId>
</dependency>
<!-- 为了节省内存,改用jetty -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<!-- 去除默认tomcat配置 -->
<exclusion>
<artifactId>spring-boot-starter-tomcat</artifactId>
<groupId>org.springframework.boot</groupId>
</exclusion>
<!-- 去除默认日志配置 -->
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
<!-- 为了节省内存,改用jetty -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j2</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<!-- pom本身还继续用版本号管理,但是由于项目用docker,为了方便,所以输出的文件名字固定,不含版本号,而通过docker来控制版本号 -->
<finalName>gdtel-gztel-jyyy-eureka</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
package com.winsun.framework.eureka;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
/**
*
* @author Liph
*/
@SpringBootApplication
@EnableEurekaServer
public class EurekaApplication {
public static void main(String[] args) {
SpringApplication.run(EurekaApplication.class, args);
}
}
server:
port: 20000
spring:
application:
name: eureka
profiles:
active: dev
eureka:
instance:
hostname: eureka
client:
##注册自己
register-with-eureka: false
fetch-registry: false
serviceUrl:
defaultZone: http://eureka:20000/eureka/
server:
enable-self-preservation: false
eviction-interval-timer-in-ms: 50000
management:
endpoints:
web:
exposure:
include: "*"
\ No newline at end of file
server:
port: 20000
spring:
application:
name: eureka
profiles:
active: prod
eureka:
instance:
hostname: eureka
client:
##注册自己
register-with-eureka: false
fetch-registry: false
serviceUrl:
defaultZone: http://localhost:20000/eureka/
server:
enable-self-preservation: false
eviction-interval-timer-in-ms: 50000
management:
endpoints:
web:
exposure:
include: "*"
\ No newline at end of file
server:
port: 20000
spring:
application:
name: eureka
profiles:
active: local
eureka:
instance:
hostname: localhost
client:
##注册自己
register-with-eureka: false
fetch-registry: false
service-url:
defaultZone: http://localhost:20000/eureka/
server:
enable-self-preservation: false
eviction-interval-timer-in-ms: 50000
management:
endpoints:
web:
exposure:
include: "*"
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!-- RollingRandomAccessFile的属性:
fileName 指定当前日志文件的位置和文件名称
filePattern 指定当发生Rolling时,文件的转移和重命名规则
SizeBasedTriggeringPolicy 指定当文件体积大于size指定的值时,触发Rolling
DefaultRolloverStrategy 指定最多保存的文件个数
TimeBasedTriggeringPolicy 这个配置需要和filePattern结合使用,
注意filePattern中配置的文件重命名规则是${FILE_NAME}-%d{yyyy-MM-dd HH-mm}-%i,最小的时间粒度是mm,即分钟,
TimeBasedTriggeringPolicy指定的size是1,结合起来就是每1分钟生成一个新文件。
如果改成%d{yyyy-MM-dd HH},最小粒度为小时,则每一个小时生成一个文件。 -->
<Configuration status="off" monitorInterval="30">
<properties>
<property name="log_path">logs</property>
</properties>
<Appenders>
<!-- <NoSql name="databaseAppender">
<MongoDb databaseName="db_cloud_device" collectionName="extract-invoice_log"
server="127.0.0.1" port="27017" userName="gzds" password="Gzds1130" />
</NoSql> -->
<!-- 打印台 -->
<Console name="Console" target="SYSTEM_OUT">
<!--控制台只输出level及以上级别的信息-->
<PatternLayout pattern="%date{yyyy-MM-dd HH:mm:ss} %level [%file:%line] - %msg%n"/>
</Console>
<RollingRandomAccessFile name="InfoFile"
fileName="${log_path}/info/info.log"
filePattern="${log_path}/info/info-%d{yyyy-MM-dd}-%i.log">
<Filters>
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="%date{yyyy-MM-dd HH:mm:ss} %level [%file:%line] - %msg%n"/>
<Policies>
<!-- 归档每天的文件 -->
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<!-- 限制单个文件大小 -->
<SizeBasedTriggeringPolicy size="20 MB"/>
</Policies>
<DefaultRolloverStrategy max="30"/>
</RollingRandomAccessFile>
<RollingRandomAccessFile name="WarnFile" fileName="${log_path}/warn/warn.log"
filePattern="${log_path}/error/error-%d{yyyy-MM-dd}-%i.log">
<Filters>
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="%date{yyyy-MM-dd_HH:mm:ss} %level [%file:%line] - %msg%n"/>
<Policies>
<!-- 归档每天的文件 -->
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<!-- 限制单个文件大小 -->
<SizeBasedTriggeringPolicy size="20 MB"/>
</Policies>
<DefaultRolloverStrategy max="30"/>
</RollingRandomAccessFile>
<RollingRandomAccessFile name="ErrorFile"
fileName="${log_path}/error/error.log"
filePattern="${log_path}/error/error-%d{yyyy-MM-dd}-%i.log">
<Filters>
<ThresholdFilter level="fatal" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="%date{yyyy-MM-dd_HH:mm:ss} %level [%file:%line] - %msg%n"/>
<Policies>
<!-- 归档每天的文件 -->
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<!-- 限制单个文件大小 -->
<SizeBasedTriggeringPolicy size="20 MB"/>
</Policies>
<DefaultRolloverStrategy max="30"/>
</RollingRandomAccessFile>
</Appenders>
<Loggers>
<Root level="info">
<appender-ref ref="Console"/>
<appender-ref ref="InfoFile"/>
<appender-ref ref="WarnFile"/>
<appender-ref ref="ErrorFile"/>
</Root>
</Loggers>
</Configuration>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>gdtel-gztel-school-center</artifactId>
<groupId>com.winsun.gdtel.gztel</groupId>
<version>0.0.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>gdtel-gztel-jyyy-gateway</artifactId>
<version>0.0.1</version>
<dependencies>
<dependency>
<groupId>com.winsun.framework</groupId>
<artifactId>winsun-gateway</artifactId>
<version>${winsun-framework.version}</version>
</dependency>
<!-- 为了节省内存,改用jetty -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<!-- 去除默认tomcat配置 -->
<exclusion>
<artifactId>spring-boot-starter-tomcat</artifactId>
<groupId>org.springframework.boot</groupId>
</exclusion>
<!-- 去除默认日志配置 -->
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
<!-- 为了节省内存,改用jetty -->
</dependencies>
<build>
<!-- pom本身还继续用版本号管理,但是由于项目用docker,为了方便,所以输出的文件名字固定,不含版本号,而通过docker来控制版本号 -->
<finalName>gdtel-gztel-jyyy-gateway</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
package com.winsun.framework.zuul;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.context.annotation.Bean;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
import org.springframework.web.filter.CorsFilter;
@SpringBootApplication
@EnableZuulProxy
@EnableEurekaClient
@RefreshScope
public class ZuulServiceApplication {
@Bean
public CorsFilter corsFilter() {
final UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
final CorsConfiguration config = new CorsConfiguration();
config.setAllowCredentials(true); // 允许cookies跨域
config.addAllowedOrigin("*");// 允许向该服务器提交请求的URI,*表示全部允许。。这里尽量限制来源域,比如http://xxxx:8080 ,以降低安全风险。。
config.addAllowedHeader("*");// 允许访问的头信息,*表示全部
config.setMaxAge(18000L);// 预检请求的缓存时间(秒),即在这个时间段里,对于相同的跨域请求不会再预检了
config.addAllowedMethod("*");// 允许提交请求的方法,*表示全部允许,也可以单独设置GET、PUT等
config.addAllowedMethod("HEAD");
config.addAllowedMethod("GET");// 允许Get的请求方法
config.addAllowedMethod("PUT");
config.addAllowedMethod("POST");
config.addAllowedMethod("DELETE");
config.addAllowedMethod("PATCH");
source.registerCorsConfiguration("/**", config);
return new CorsFilter(source);
}
public static void main(String[] args) {
SpringApplication.run(ZuulServiceApplication.class, args);
}
}
eureka:
instance:
hostname: eureka
prefer-ip-address: true
instance-id: ${spring.application.name}:${spring.cloud.client.ipAddress}:${spring.application.instance_id:${server.port}}
# 心跳时间,即服务续约间隔时间(缺省为30s)
lease-renewal-interval-in-seconds: 10
# 发呆时间,即服务续约到期时间(缺省为90s)
lease-expiration-duration-in-seconds: 20
client:
registry-fetch-interval-seconds: 5
serviceUrl:
defaultZone: http://eureka:20000/eureka/
server:
port: 10001
tomcat:
uri-encoding: UTF-8
max-threads: 1000
max-connections: 20000
spring:
application:
name: gateway
profiles:
active: dev
servlet:
multipart:
enabled: true
max-request-size: 100MB
max-file-size: 100MB
datasource:
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://132.97.20.47:30885/jyyy?useSSL=false
username: jyyy
password: jyyy123##
zuul:
ribbon:
eager-load:
enabled: true
retryable: true
host:
max-total-connections: 1200
max-per-route-connections: 1200
connectTimeoutMillis: 10000
ribbon-isolation-strategy: THREAD
thread-pool:
thread-pool-key-prefix: winsun-zuul
use-separate-thread-pools: true
routes:
auth:
path: /auth/**
sensitiveHeaders:
serviceId: core
jyyy:
path: /jyyy/**
sensitiveHeaders:
serviceId: manager
ribbon:
# OkToRetryOnAllOperations: true
MaxAutoRetries: 0
MaxAutoRetriesNextServer: 0
ReadTimeout: 20000
ConnectTimeout: 2000
SocketTimeout: 2000
hystrix:
command:
default: #default全局有效,service id指定应用有效
circuitBreaker:
enabled: false
threadpool:
default:
coreSize: 1200
maximumSize: 1200
allowMaximumSizeToDivergeFromCoreSize: true
maxQueueSize: 5000
queueSizeRejectionThreshold: 4800
execution:
isolation:
thread:
timeoutInMilliseconds: 20000
management:
endpoints:
web:
exposure:
include: bus-refresh
\ No newline at end of file
eureka:
instance:
hostname: eureka
prefer-ip-address: true
instance-id: ${spring.application.name}:${spring.cloud.client.ipAddress}:${spring.application.instance_id:${server.port}}
# 心跳时间,即服务续约间隔时间(缺省为30s)
lease-renewal-interval-in-seconds: 10
# 发呆时间,即服务续约到期时间(缺省为90s)
lease-expiration-duration-in-seconds: 20
client:
registry-fetch-interval-seconds: 5
serviceUrl:
defaultZone: http://eureka:20000/eureka/
server:
port: 10001
tomcat:
uri-encoding: UTF-8
max-threads: 1000
max-connections: 20000
spring:
application:
name: gateway
profiles:
active: prod
servlet:
multipart:
enabled: true
max-request-size: 100MB
max-file-size: 100MB
datasource:
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://192.168.2.118:30885/jyyy?useSSL=false
username: jyyy
password: jyyy123##
zuul:
ribbon:
eager-load:
enabled: true
retryable: true
host:
max-total-connections: 1200
max-per-route-connections: 1200
connectTimeoutMillis: 10000
ribbon-isolation-strategy: THREAD
thread-pool:
thread-pool-key-prefix: winsun-zuul
use-separate-thread-pools: true
routes:
auth:
path: /auth/**
sensitiveHeaders:
serviceId: core
jyyy:
path: /jyyy/**
sensitiveHeaders:
serviceId: manager
ribbon:
# OkToRetryOnAllOperations: true
MaxAutoRetries: 0
MaxAutoRetriesNextServer: 0
ReadTimeout: 20000
ConnectTimeout: 2000
SocketTimeout: 2000
hystrix:
command:
default: #default全局有效,service id指定应用有效
circuitBreaker:
enabled: false
threadpool:
default:
coreSize: 1200
maximumSize: 1200
allowMaximumSizeToDivergeFromCoreSize: true
maxQueueSize: 5000
queueSizeRejectionThreshold: 4800
execution:
isolation:
thread:
timeoutInMilliseconds: 20000
management:
endpoints:
web:
exposure:
include: bus-refresh
\ No newline at end of file
eureka:
instance:
hostname: localhost
# 心跳时间,即服务续约间隔时间(缺省为30s)
lease-renewal-interval-in-seconds: 10
# 发呆时间,即服务续约到期时间(缺省为90s)
lease-expiration-duration-in-seconds: 20
client:
registry-fetch-interval-seconds: 5
serviceUrl:
defaultZone: http://localhost:20000/eureka/
server:
port: 10001
tomcat:
uri-encoding: UTF-8
max-threads: 1000
max-connections: 20000
spring:
application:
name: gateway
profiles:
active: local
servlet:
multipart:
enabled: true
max-request-size: 100MB
max-file-size: 100MB
datasource:
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://172.18.101.171:3306/ws_project?useSSL=false
username: root
password: AMrGBg6ZSsRrDLs6
zuul:
ribbon:
eager-load:
enabled: true
retryable: true
host:
max-total-connections: 1200
max-per-route-connections: 1200
connectTimeoutMillis: 10000
ribbon-isolation-strategy: THREAD
thread-pool:
thread-pool-key-prefix: winsun-zuul
use-separate-thread-pools: true
routes:
auth:
path: /auth/**
sensitiveHeaders:
serviceId: core
jyyy:
path: /jyyy/**
sensitiveHeaders:
serviceId: manager
ribbon:
# OkToRetryOnAllOperations: true
MaxAutoRetries: 0
MaxAutoRetriesNextServer: 0
ReadTimeout: 20000
ConnectTimeout: 2000
SocketTimeout: 2000
hystrix:
command:
default: #default全局有效,service id指定应用有效
circuitBreaker:
enabled: false
threadpool:
default:
coreSize: 1200
maximumSize: 1200
allowMaximumSizeToDivergeFromCoreSize: true
maxQueueSize: 5000
queueSizeRejectionThreshold: 4800
execution:
isolation:
thread:
timeoutInMilliseconds: 20000
management:
endpoints:
web:
exposure:
include: bus-refresh
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!-- RollingRandomAccessFile的属性:
fileName 指定当前日志文件的位置和文件名称
filePattern 指定当发生Rolling时,文件的转移和重命名规则
SizeBasedTriggeringPolicy 指定当文件体积大于size指定的值时,触发Rolling
DefaultRolloverStrategy 指定最多保存的文件个数
TimeBasedTriggeringPolicy 这个配置需要和filePattern结合使用,
注意filePattern中配置的文件重命名规则是${FILE_NAME}-%d{yyyy-MM-dd HH-mm}-%i,最小的时间粒度是mm,即分钟,
TimeBasedTriggeringPolicy指定的size是1,结合起来就是每1分钟生成一个新文件。
如果改成%d{yyyy-MM-dd HH},最小粒度为小时,则每一个小时生成一个文件。 -->
<Configuration status="off" monitorInterval="30">
<properties>
<property name="log_path">logs</property>
</properties>
<Appenders>
<!-- <NoSql name="databaseAppender">
<MongoDb databaseName="db_cloud_device" collectionName="extract-invoice_log"
server="127.0.0.1" port="27017" userName="gzds" password="Gzds1130" />
</NoSql> -->
<!-- 打印台 -->
<Console name="Console" target="SYSTEM_OUT">
<!--控制台只输出level及以上级别的信息-->
<PatternLayout pattern="%date{yyyy-MM-dd HH:mm:ss} %level [%file:%line] - %msg%n" />
</Console>
<RollingRandomAccessFile name="InfoFile"
fileName="${log_path}/info/info.log"
filePattern="${log_path}/info/info-%d{yyyy-MM-dd}-%i.log">
<Filters>
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL" />
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY" />
</Filters>
<PatternLayout pattern="%date{yyyy-MM-dd HH:mm:ss} %level [%file:%line] - %msg%n" />
<Policies>
<!-- 归档每天的文件 -->
<TimeBasedTriggeringPolicy interval="1" modulate="true" />
<!-- 限制单个文件大小 -->
<SizeBasedTriggeringPolicy size="20 MB" />
</Policies>
<DefaultRolloverStrategy max="30" />
</RollingRandomAccessFile>
<RollingRandomAccessFile name="WarnFile"
fileName="${log_path}/warn/warn.log"
filePattern="${log_path}/error/error-%d{yyyy-MM-dd}-%i.log">
<Filters>
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL" />
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY" />
</Filters>
<PatternLayout pattern="%date{yyyy-MM-dd_HH:mm:ss} %level [%file:%line] - %msg%n" />
<Policies>
<!-- 归档每天的文件 -->
<TimeBasedTriggeringPolicy interval="1" modulate="true" />
<!-- 限制单个文件大小 -->
<SizeBasedTriggeringPolicy size="20 MB" />
</Policies>
<DefaultRolloverStrategy max="30" />
</RollingRandomAccessFile>
<RollingRandomAccessFile name="ErrorFile"
fileName="${log_path}/error/error.log"
filePattern="${log_path}/error/error-%d{yyyy-MM-dd}-%i.log">
<Filters>
<ThresholdFilter level="fatal" onMatch="DENY" onMismatch="NEUTRAL" />
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY" />
</Filters>
<PatternLayout pattern="%date{yyyy-MM-dd_HH:mm:ss} %level [%file:%line] - %msg%n" />
<Policies>
<!-- 归档每天的文件 -->
<TimeBasedTriggeringPolicy interval="1" modulate="true" />
<!-- 限制单个文件大小 -->
<SizeBasedTriggeringPolicy size="20 MB" />
</Policies>
<DefaultRolloverStrategy max="30" />
</RollingRandomAccessFile>
</Appenders>
<Loggers>
<Root level="info">
<appender-ref ref="Console" />
<appender-ref ref="InfoFile" />
<appender-ref ref="WarnFile" />
<appender-ref ref="ErrorFile" />
</Root>
</Loggers>
</Configuration>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>gdtel-gztel-school-center</artifactId>
<groupId>com.winsun.gdtel.gztel</groupId>
<version>0.0.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>gdtel-gztel-jyyy-service-manager</artifactId>
<description>外呼集约系统主要服务模块</description>
<version>0.0.1</version>
<dependencies>
<!-- 为了节省内存,改用jetty -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<!-- 去除默认tomcat配置 -->
<exclusion>
<artifactId>spring-boot-starter-tomcat</artifactId>
<groupId>org.springframework.boot</groupId>
</exclusion>
<!-- 去除默认日志配置 -->
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
<!-- 为了节省内存,改用jetty -->
<!--spring boot依赖 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j2</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatisplus-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
</dependency>
<dependency>
<groupId>com.winsun.framework</groupId>
<artifactId>winsun-utils-redis</artifactId>
<version>${winsun-framework.version}</version>
</dependency>
<dependency>
<groupId>com.winsun.framework</groupId>
<artifactId>winsun-core-api</artifactId>
</dependency>
<!-- 数据库连接部分 -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
</dependency>
<dependency>
<artifactId>p6spy</artifactId>
<groupId>p6spy</groupId>
</dependency>
<dependency>
<artifactId>druid-spring-boot-starter</artifactId>
<groupId>com.alibaba</groupId>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
</dependency>
</dependencies>
<build>
<finalName>gdtel-gztel-jyyy-service-manager</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork><!-- 如果没有该项配置,肯呢个devtools不会起作用,即应用不会restart -->
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
<profiles>
<profile>
<id>local</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<profileActive>local</profileActive>
</properties>
</profile>
<profile>
<id>dev</id>
<properties>
<profileActive>dev</profileActive>
</properties>
</profile>
<profile>
<id>prod</id>
<properties>
<profileActive>prod</profileActive>
</properties>
</profile>
</profiles>
</project>
\ No newline at end of file
package com.winsun;
import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.scheduling.annotation.EnableScheduling;
/**
* 系统启动入口
* @author Liph
*/
@EnableAspectJAutoProxy(exposeProxy = true)
@EnableEurekaClient
@SpringBootApplication(exclude= {DruidDataSourceAutoConfigure.class})
@RefreshScope
@EnableFeignClients({"com.winsun","com.winsun.auth.core"})
@MapperScan(basePackages = {"com.winsun.*.mapper","com.winsun.mapper"})
@EnableScheduling // 开启定时任务
public class JyyyServiceApplication {
private final static Logger logger = LoggerFactory.getLogger(JyyyServiceApplication.class);
public static void main(String[] args) {
SpringApplication.run(JyyyServiceApplication.class, args);
logger.info("集约平台核心服务系统模块启动成功!!!");
}
}
eureka:
instance:
hostname: eureka
prefer-ip-address: true
instance-id: ${spring.application.name}:${spring.cloud.client.ipAddress}:${spring.application.instance_id:${server.port}}
# 心跳时间,即服务续约间隔时间(缺省为30s)
lease-renewal-interval-in-seconds: 10
# 发呆时间,即服务续约到期时间(缺省为90s)
lease-expiration-duration-in-seconds: 20
client:
registry-fetch-interval-seconds: 5
serviceUrl:
defaultZone: http://eureka:20000/eureka/
server:
port: 11091
servlet:
context-path: /ciop
tomcat:
uri-encoding: UTF-8
max-threads: 200
max-connections: 2000
winsun:
app:
version: @project.version@
name: ${spring.application.name}
scanner: false
auth:
#鉴权地址
serviceId: core
#是否开启swagger (true/false)
swagger-open: true
#是否开启登录时验证码 (true/false)
kaptcha-open: false
#是否开启spring session,如果是多机环境需要开启(true/false)
spring-session-open: false
redis-session-expire: 86400
#session失效时间(只在单机环境下生效,多机环境在SpringSessionConfig类中配置) 单位:秒
session-invalidate-time: 1800
#多久检测一次失效的session(只在单机环境下生效) 单位:秒
session-validation-interval: 900
spring:
profiles:
active: dev
quartz:
job-store-type: jdbc
jdbc:
initialize-schema: never
properties:
org:
quartz:
scheduler:
instanceName: DefaultQuartzScheduler
instanceId: AUTO
jobStore:
dataSource: default
class: org.quartz.impl.jdbcjobstore.JobStoreTX
driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
tablePrefix: QRTZ_
isClustered: false
clusterCheckinInterval: 10000
useProperties: true
misfireThreshold: 5000
threadPool:
class: org.quartz.simpl.SimpleThreadPool
threadCount: 10
threadPriority: 5
threadsInheritContextClassLoaderOfInitializingThread: true
cloud:
stream:
bindings:
menuOutput:
destination: queue.menu.messages
binder: local_rabbit
content-type: application/json
binders:
local_rabbit:
type: rabbit
environment:
spring:
rabbitmq:
host: ${spring.rabbitmq.host}
port: ${spring.rabbitmq.port}
password: ${spring.rabbitmq.username}
username: ${spring.rabbitmq.password}
rabbit:
bindings:
input:
consumer:
# maxumum concurrency of this consumer (threads)
max-concurrency: 50
# number of prefetched messages pre consumer thread
prefetch: 100
# true to requeue rejected messages, false to discard (or route to DLQ)
requeue-rejected: false
# republish failures to the DLQ with diagnostic headers
republish-to-dlq: true
rabbitmq:
host: jyyy-rabbitmq
port: 5672
username: guest
password: guest
redis:
clusterWhether: false
cluster:
max-redirects: 3
nodes:
- jyyy-redis:6379
database: 0
host: jyyy-redis
port: 6379
password:
lettuce:
pool:
max-active: -1
max-wait: -1
max-idle: 8
min-idle: 0
timeout: 5000
ip:
exprie: 600
prohibition: 600
datasource:
#url: jdbc:mysql://jyyy-mysql:3306/jyyy_test?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&allowPublicKeyRetrieval=true
#username: root
#password: 123456
#filters: wall,mergeStat
dynamic:
primary: master
p6spy: true
druid:
filters: stat
max-active: 30
datasource:
master:
url: jdbc:mysql://172.18.101.171:3306/dzqd?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&allowPublicKeyRetrieval=true
username: root
password: AMrGBg6ZSsRrDLs6
driver-class-name: com.mysql.cj.jdbc.Driver
devtools:
restart:
enabled: false
additional-paths: src/main/java
exclude: static/**,WEB-INF/view/**
servlet:
multipart:
enabled: true
max-request-size: 100MB
max-file-size: 100MB
application:
name: manager
feign:
hystrix:
enabled: true
httpclient:
enabled: true
okhttp:
enabled: false
ribbon:
MaxAutoRetries: 0
MaxAutoRetriesNextServer: 0
ReadTimeout: 4400
ConnectTimeout: 2000
hystrix:
threadpool:
default:
coreSize: 100
maximumSize: 100
allowMaximumSizeToDivergeFromCoreSize: true
maxQueueSize: 20000
queueSizeRejectionThreshold: 19999
command:
#default全局有效,service id指定应用有效
default:
circuitBreaker:
enabled: false
execution:
timeout:
#如果enabled设置为false,则请求超时交给ribbon控制,为true,则超时作为熔断根据
enabled: true
isolation:
thread:
timeoutInMilliseconds: 4500 #断路器超时时间,默认1000ms
mybatis-plus:
typeAliasesPackage: com.winsun.bean,com.winsun.framework.core.node
mapper-locations:
- com/winsun/mapper/mapping/*.xml
management:
endpoints:
web:
exposure:
include: bus-refresh
\ No newline at end of file
eureka:
instance:
hostname: eureka
prefer-ip-address: true
instance-id: ${spring.application.name}:${spring.cloud.client.ipAddress}:${spring.application.instance_id:${server.port}}
# 心跳时间,即服务续约间隔时间(缺省为30s)
lease-renewal-interval-in-seconds: 10
# 发呆时间,即服务续约到期时间(缺省为90s)
lease-expiration-duration-in-seconds: 20
client:
registry-fetch-interval-seconds: 5
serviceUrl:
defaultZone: http://eureka:20000/eureka/
server:
port: 11091
servlet:
context-path: /ciop
tomcat:
uri-encoding: UTF-8
max-threads: 200
max-connections: 2000
winsun:
app:
version: @project.version@
name: ${spring.application.name}
scanner: false
auth:
#鉴权地址
serviceId: core
#是否开启swagger (true/false)
swagger-open: true
#是否开启登录时验证码 (true/false)
kaptcha-open: false
#是否开启spring session,如果是多机环境需要开启(true/false)
spring-session-open: false
redis-session-expire: 86400
#session失效时间(只在单机环境下生效,多机环境在SpringSessionConfig类中配置) 单位:秒
session-invalidate-time: 1800
#多久检测一次失效的session(只在单机环境下生效) 单位:秒
session-validation-interval: 900
spring:
profiles:
active: prod
quartz:
job-store-type: jdbc
jdbc:
initialize-schema: never
properties:
org:
quartz:
scheduler:
instanceName: DefaultQuartzScheduler
instanceId: AUTO
jobStore:
dataSource: default
class: org.quartz.impl.jdbcjobstore.JobStoreTX
driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
tablePrefix: QRTZ_
isClustered: false
clusterCheckinInterval: 10000
useProperties: true
misfireThreshold: 5000
threadPool:
class: org.quartz.simpl.SimpleThreadPool
threadCount: 10
threadPriority: 5
threadsInheritContextClassLoaderOfInitializingThread: true
cloud:
stream:
bindings:
menuOutput:
destination: queue.menu.messages
binder: local_rabbit
content-type: application/json
binders:
local_rabbit:
type: rabbit
environment:
spring:
rabbitmq:
host: ${spring.rabbitmq.host}
port: ${spring.rabbitmq.port}
username: ${spring.rabbitmq.username}
password: ${spring.rabbitmq.password}
rabbit:
bindings:
input:
consumer:
# maxumum concurrency of this consumer (threads)
max-concurrency: 50
# number of prefetched messages pre consumer thread
prefetch: 100
# true to requeue rejected messages, false to discard (or route to DLQ)
requeue-rejected: false
# republish failures to the DLQ with diagnostic headers
republish-to-dlq: true
rabbitmq:
host: rabbitmq
port: 5672
username: guest
password: guest
redis:
clusterWhether: false
cluster:
max-redirects: 3
nodes:
- redis:6379
database: 0
host: redis
port: 6379
password: QpUd11WzsuBV3RZd
lettuce:
pool:
max-active: -1
max-wait: -1
max-idle: 8
min-idle: 0
timeout: 5000
ip:
exprie: 600
prohibition: 600
datasource:
dynamic:
primary: master
p6spy: true
druid:
filters: stat
max-active: 30
datasource:
master:
url: jdbc:mysql://172.18.101.171:3306/dzqd?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&allowPublicKeyRetrieval=true
username: root
password: AMrGBg6ZSsRrDLs6
driver-class-name: com.mysql.cj.jdbc.Driver
devtools:
restart:
enabled: false
additional-paths: src/main/java
exclude: static/**,WEB-INF/view/**
servlet:
multipart:
enabled: true
max-request-size: 100MB
max-file-size: 100MB
application:
name: manager
feign:
hystrix:
enabled: true
httpclient:
enabled: true
okhttp:
enabled: false
ribbon:
MaxAutoRetries: 0
MaxAutoRetriesNextServer: 0
ReadTimeout: 4400
ConnectTimeout: 2000
hystrix:
threadpool:
default:
coreSize: 100
maximumSize: 100
allowMaximumSizeToDivergeFromCoreSize: true
maxQueueSize: 20000
queueSizeRejectionThreshold: 19999
command:
#default全局有效,service id指定应用有效
default:
circuitBreaker:
enabled: false
execution:
timeout:
#如果enabled设置为false,则请求超时交给ribbon控制,为true,则超时作为熔断根据
enabled: true
isolation:
thread:
timeoutInMilliseconds: 4500 #断路器超时时间,默认1000ms
mybatis-plus:
typeAliasesPackage: com.winsun.bean,com.winsun.framework.core.node
mapper-locations:
- com/winsun/mapper/mapping/*.xml
management:
endpoints:
web:
exposure:
include: bus-refresh
\ No newline at end of file
eureka:
instance:
hostname: localhost
# 心跳时间,即服务续约间隔时间(缺省为30s)
lease-renewal-interval-in-seconds: 10
# 发呆时间,即服务续约到期时间(缺省为90s)
lease-expiration-duration-in-seconds: 20
client:
registry-fetch-interval-seconds: 5
serviceUrl:
defaultZone: http://localhost:20000/eureka/
server:
port: 11091
servlet:
context-path: /ciop
tomcat:
uri-encoding: UTF-8
max-threads: 200
max-connections: 2000
winsun:
app:
version: @project.version@
name: ${spring.application.name}
scanner: false
auth:
#鉴权地址
serviceId: core
#是否开启swagger (true/false)
swagger-open: true
#是否开启登录时验证码 (true/false)
kaptcha-open: false
#是否开启spring session,如果是多机环境需要开启(true/false)
spring-session-open: false
redis-session-expire: 86400
#session失效时间(只在单机环境下生效,多机环境在SpringSessionConfig类中配置) 单位:秒
session-invalidate-time: 1800
#多久检测一次失效的session(只在单机环境下生效) 单位:秒
session-validation-interval: 900
fileUploadPath: tmpUpload/
spring:
profiles:
active: local
quartz:
job-store-type: jdbc
jdbc:
initialize-schema: never
properties:
org:
quartz:
scheduler:
instanceName: DefaultQuartzScheduler
instanceId: AUTO
jobStore:
dataSource: default
class: org.quartz.impl.jdbcjobstore.JobStoreTX
driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
tablePrefix: QRTZ_
isClustered: false
clusterCheckinInterval: 10000
useProperties: true
misfireThreshold: 5000
threadPool:
class: org.quartz.simpl.SimpleThreadPool
threadCount: 10
threadPriority: 5
threadsInheritContextClassLoaderOfInitializingThread: true
cloud:
stream:
bindings:
menuOutput:
destination: queue.menu.messages
binder: local_rabbit
content-type: application/json
binders:
local_rabbit:
type: rabbit
environment:
spring:
rabbitmq:
host: ${spring.rabbitmq.host}
port: ${spring.rabbitmq.port}
username: ${spring.rabbitmq.username}
password: ${spring.rabbitmq.password}
rabbit:
bindings:
input:
consumer:
# maxumum concurrency of this consumer (threads)
max-concurrency: 50
# number of prefetched messages pre consumer thread
prefetch: 100
# true to requeue rejected messages, false to discard (or route to DLQ)
requeue-rejected: false
# republish failures to the DLQ with diagnostic headers
republish-to-dlq: true
rabbitmq:
host: localhost
port: 5672
username: guest
password: guest
redis:
# 是否使用集群模式
clusterWhether: false
cluster:
max-redirects: 3
nodes:
- localhost:6379
database: 0
host: localhost
port: 6379
password:
lettuce:
pool:
max-active: -1
max-wait: -1
max-idle: 8
min-idle: 0
timeout: 50000
ip:
exprie: 600
prohibition: 600
datasource:
dynamic:
primary: master
p6spy: true
druid:
filters: stat
max-active: 30
datasource:
master:
url: jdbc:mysql://172.18.101.171:3306/dzqd?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&allowPublicKeyRetrieval=true
username: root
password: AMrGBg6ZSsRrDLs6
driver-class-name: com.mysql.cj.jdbc.Driver
devtools:
restart:
enabled: false
additional-paths: src/main/java
exclude: static/**,WEB-INF/view/**
servlet:
multipart:
enabled: true
max-request-size: 100MB
max-file-size: 100MB
application:
name: manager
feign:
hystrix:
enabled: true
httpclient:
enabled: true
okhttp:
enabled: false
ribbon:
MaxAutoRetries: 0
MaxAutoRetriesNextServer: 0
ReadTimeout: 4400
ConnectTimeout: 2000
hystrix:
threadpool:
default:
coreSize: 100
maximumSize: 100
allowMaximumSizeToDivergeFromCoreSize: true
maxQueueSize: 20000
queueSizeRejectionThreshold: 19999
command:
#default全局有效,service id指定应用有效
default:
circuitBreaker:
enabled: false
execution:
timeout:
#如果enabled设置为false,则请求超时交给ribbon控制,为true,则超时作为熔断根据
enabled: true
isolation:
thread:
#断路器超时时间,默认1000ms
timeoutInMilliseconds: 4500
mybatis-plus:
typeAliasesPackage: com.winsun.bean,com.winsun.framework.core.node
mapper-locations:
- com/winsun/mapper/mapping/*.xml
- com/winsun/modular/dao/mapping/*.xml
management:
endpoints:
web:
exposure:
include: bus-refresh
<?xml version="1.0" encoding="UTF-8"?>
<!-- RollingRandomAccessFile的属性:
fileName 指定当前日志文件的位置和文件名称
filePattern 指定当发生Rolling时,文件的转移和重命名规则
SizeBasedTriggeringPolicy 指定当文件体积大于size指定的值时,触发Rolling
DefaultRolloverStrategy 指定最多保存的文件个数
TimeBasedTriggeringPolicy 这个配置需要和filePattern结合使用,
注意filePattern中配置的文件重命名规则是${FILE_NAME}-%d{yyyy-MM-dd HH-mm}-%i,最小的时间粒度是mm,即分钟,
TimeBasedTriggeringPolicy指定的size是1,结合起来就是每1分钟生成一个新文件。
如果改成%d{yyyy-MM-dd HH},最小粒度为小时,则每一个小时生成一个文件。 -->
<Configuration status="off" monitorInterval="30">
<properties>
<property name="log_path">logs</property>
</properties>
<Appenders>
<!-- <NoSql name="databaseAppender">
<MongoDb databaseName="db_cloud_device" collectionName="extract-invoice_log"
server="127.0.0.1" port="27017" userName="gzds" password="Gzds1130" />
</NoSql> -->
<!-- 打印台 -->
<Console name="Console" target="SYSTEM_OUT">
<!--控制台只输出level及以上级别的信息-->
<PatternLayout pattern="%date{yyyy-MM-dd HH:mm:ss} %level [%file:%line] - %msg%n"/>
</Console>
<RollingRandomAccessFile name="InfoFile"
fileName="${log_path}/info/info.log"
filePattern="${log_path}/info/info-%d{yyyy-MM-dd}-%i.log">
<Filters>
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="%date{yyyy-MM-dd HH:mm:ss} %level [%file:%line] - %msg%n"/>
<Policies>
<!-- 归档每天的文件 -->
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<!-- 限制单个文件大小 -->
<SizeBasedTriggeringPolicy size="20 MB"/>
</Policies>
<DefaultRolloverStrategy max="30"/>
</RollingRandomAccessFile>
<RollingRandomAccessFile name="WarnFile" fileName="${log_path}/warn/warn.log"
filePattern="${log_path}/error/error-%d{yyyy-MM-dd}-%i.log">
<Filters>
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="%date{yyyy-MM-dd_HH:mm:ss} %level [%file:%line] - %msg%n"/>
<Policies>
<!-- 归档每天的文件 -->
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<!-- 限制单个文件大小 -->
<SizeBasedTriggeringPolicy size="20 MB"/>
</Policies>
<DefaultRolloverStrategy max="30"/>
</RollingRandomAccessFile>
<RollingRandomAccessFile name="ErrorFile"
fileName="${log_path}/error/error.log"
filePattern="${log_path}/error/error-%d{yyyy-MM-dd}-%i.log">
<Filters>
<ThresholdFilter level="fatal" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="%date{yyyy-MM-dd_HH:mm:ss} %level [%file:%line] - %msg%n"/>
<Policies>
<!-- 归档每天的文件 -->
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<!-- 限制单个文件大小 -->
<SizeBasedTriggeringPolicy size="20 MB"/>
</Policies>
<DefaultRolloverStrategy max="30"/>
</RollingRandomAccessFile>
</Appenders>
<Loggers>
<Root level="info">
<appender-ref ref="Console"/>
<appender-ref ref="InfoFile"/>
<appender-ref ref="WarnFile"/>
<appender-ref ref="ErrorFile"/>
</Root>
</Loggers>
</Configuration>
\ No newline at end of file
appender=com.p6spy.engine.spy.appender.Slf4JLogger
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>gdtel-gztel-school-center</artifactId>
<groupId>com.winsun.gdtel.gztel</groupId>
<version>0.0.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>gdtel-gztel-jyyy-task</artifactId>
<description>外呼集约定时器系统服务模块</description>
<version>0.0.1</version>
<dependencies>
<!-- 为了节省内存,改用jetty -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
<!-- 为了节省内存,改用jetty -->
<!--spring boot依赖 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j2</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatisplus-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
</dependency>
<dependency>
<groupId>com.winsun.framework</groupId>
<artifactId>winsun-core-common</artifactId>
</dependency>
<dependency>
<groupId>com.winsun.framework</groupId>
<artifactId>winsun-core-api</artifactId>
</dependency>
<dependency>
<groupId>com.winsun.gdtel.gztel</groupId>
<artifactId>gdtel-gztel-jyyy-common</artifactId>
<version>${gdtel-jyyy-service.version}</version>
<exclusions>
<exclusion>
<artifactId>p6spy</artifactId>
<groupId>p6spy</groupId>
</exclusion>
<exclusion>
<groupId>com.baomidou</groupId>
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- 数据库连接部分 -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
</dependency>
</dependencies>
<build>
<finalName>gdtel-gztel-jyyy-task</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork><!-- 如果没有该项配置,肯呢个devtools不会起作用,即应用不会restart -->
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
<profiles>
<profile>
<id>local</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<profileActive>local</profileActive>
</properties>
</profile>
<profile>
<id>dev</id>
<properties>
<profileActive>dev</profileActive>
</properties>
</profile>
<profile>
<id>prod</id>
<properties>
<profileActive>prod</profileActive>
</properties>
</profile>
</profiles>
</project>
{"properties": [
{
"name": "ribbon.ReadTimeout",
"type": "java.lang.String",
"description": "A description for 'ribbon.ReadTimeout'"
},
{
"name": "ribbon.MaxAutoRetries",
"type": "java.lang.String",
"description": "A description for 'ribbon.MaxAutoRetries'"
}
]}
\ No newline at end of file
eureka:
instance:
hostname: eureka
prefer-ip-address: true
instance-id: ${spring.application.name}:${spring.cloud.client.ipAddress}:${spring.application.instance_id:${server.port}}
# 心跳时间,即服务续约间隔时间(缺省为30s)
lease-renewal-interval-in-seconds: 10
# 发呆时间,即服务续约到期时间(缺省为90s)
lease-expiration-duration-in-seconds: 20
client:
registry-fetch-interval-seconds: 5
serviceUrl:
defaultZone: http://eureka:20000/eureka/
server:
port: 11191
servlet:
context-path: /ciop
tomcat:
uri-encoding: UTF-8
max-threads: 200
max-connections: 2000
winsun:
app:
version: @project.version@
name: ${spring.application.name}
scanner: false
auth:
#鉴权地址
serviceId: jyyy-core
#是否开启swagger (true/false)
swagger-open: true
#是否开启登录时验证码 (true/false)
kaptcha-open: false
#是否开启spring session,如果是多机环境需要开启(true/false)
spring-session-open: false
redis-session-expire: 86400
#session失效时间(只在单机环境下生效,多机环境在SpringSessionConfig类中配置) 单位:秒
session-invalidate-time: 1800
#多久检测一次失效的session(只在单机环境下生效) 单位:秒
session-validation-interval: 900
fileUploadPath: tmpUpload/
spring:
profiles:
active: dev
quartz:
job-store-type: jdbc
jdbc:
initialize-schema: never
properties:
org:
quartz:
scheduler:
instanceName: DefaultQuartzScheduler
instanceId: AUTO
jobStore:
dataSource: default
class: org.quartz.impl.jdbcjobstore.JobStoreTX
driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
tablePrefix: QRTZ_
isClustered: false
clusterCheckinInterval: 10000
useProperties: true
misfireThreshold: 5000
threadPool:
class: org.quartz.simpl.SimpleThreadPool
threadCount: 10
threadPriority: 5
threadsInheritContextClassLoaderOfInitializingThread: true
cloud:
stream:
bindings:
menuOutput:
destination: queue.menu.messages
binder: local_rabbit
content-type: application/json
binders:
local_rabbit:
type: rabbit
environment:
spring:
rabbitmq:
host: ${spring.rabbitmq.host}
port: ${spring.rabbitmq.port}
username: ${spring.rabbitmq.username}
password: ${spring.rabbitmq.password}
rabbit:
bindings:
input:
consumer:
# maxumum concurrency of this consumer (threads)
max-concurrency: 50
# number of prefetched messages pre consumer thread
prefetch: 100
# true to requeue rejected messages, false to discard (or route to DLQ)
requeue-rejected: false
# republish failures to the DLQ with diagnostic headers
republish-to-dlq: true
rabbitmq:
host: jyyy-rabbitmq
port: 5672
username: guest
password: guest
redis:
clusterWhether: false
cluster:
max-redirects: 3
nodes:
- jyyy-redis:6379
database: 0
host: jyyy-redis
port: 6379
password:
lettuce:
pool:
max-active: -1
max-wait: -1
max-idle: 8
min-idle: 0
timeout: 50000
ip:
exprie: 600
prohibition: 600
datasource:
url: jdbc:mysql://172.18.101.171:3306/dzqd?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&allowPublicKeyRetrieval=true
username: root
password: AMrGBg6ZSsRrDLs6
filters: wall,mergeStat
max-active: 20
devtools:
restart:
enabled: false
additional-paths: src/main/java
exclude: static/**,WEB-INF/view/**
servlet:
multipart:
enabled: true
max-request-size: 100MB
max-file-size: 100MB
application:
name: task
feign:
hystrix:
enabled: true
httpclient:
enabled: true
okhttp:
enabled: false
ribbon:
MaxAutoRetries: 0
MaxAutoRetriesNextServer: 0
ReadTimeout: 4400
ConnectTimeout: 2000
hystrix:
threadpool:
default:
coreSize: 100
maximumSize: 100
allowMaximumSizeToDivergeFromCoreSize: true
maxQueueSize: 20000
queueSizeRejectionThreshold: 19999
command:
#default全局有效,service id指定应用有效
default:
circuitBreaker:
enabled: false
execution:
timeout:
#如果enabled设置为false,则请求超时交给ribbon控制,为true,则超时作为熔断根据
enabled: true
isolation:
thread:
#断路器超时时间,默认1000ms
timeoutInMilliseconds: 4500
mybatis-plus:
typeAliasesPackage: com.winsun.bean,com.winsun.framework.core.node
mapper-locations:
- com/winsun/mapper/mapping/*.xml
- com/winsun/modular/dao/mapping/*.xml
management:
endpoints:
web:
exposure:
include: bus-refresh
\ No newline at end of file
eureka:
instance:
hostname: eureka
prefer-ip-address: true
instance-id: ${spring.application.name}:${spring.cloud.client.ipAddress}:${spring.application.instance_id:${server.port}}
# 心跳时间,即服务续约间隔时间(缺省为30s)
lease-renewal-interval-in-seconds: 10
# 发呆时间,即服务续约到期时间(缺省为90s)
lease-expiration-duration-in-seconds: 20
client:
registry-fetch-interval-seconds: 5
serviceUrl:
defaultZone: http://eureka:20000/eureka/
server:
port: 11191
servlet:
context-path: /ciop
tomcat:
uri-encoding: UTF-8
max-threads: 200
max-connections: 2000
winsun:
app:
version: @project.version@
name: ${spring.application.name}
scanner: false
auth:
#鉴权地址
serviceId: core
#是否开启swagger (true/false)
swagger-open: true
#是否开启登录时验证码 (true/false)
kaptcha-open: false
#是否开启spring session,如果是多机环境需要开启(true/false)
spring-session-open: false
redis-session-expire: 86400
#session失效时间(只在单机环境下生效,多机环境在SpringSessionConfig类中配置) 单位:秒
session-invalidate-time: 1800
#多久检测一次失效的session(只在单机环境下生效) 单位:秒
session-validation-interval: 900
fileUploadPath: tmpUpload/
spring:
profiles:
active: prod
quartz:
job-store-type: jdbc
jdbc:
initialize-schema: never
properties:
org:
quartz:
scheduler:
instanceName: DefaultQuartzScheduler
instanceId: AUTO
jobStore:
dataSource: default
class: org.quartz.impl.jdbcjobstore.JobStoreTX
driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
tablePrefix: QRTZ_
isClustered: false
clusterCheckinInterval: 10000
useProperties: true
misfireThreshold: 5000
threadPool:
class: org.quartz.simpl.SimpleThreadPool
threadCount: 10
threadPriority: 5
threadsInheritContextClassLoaderOfInitializingThread: true
cloud:
stream:
bindings:
menuOutput:
destination: queue.menu.messages
binder: local_rabbit
content-type: application/json
binders:
local_rabbit:
type: rabbit
environment:
spring:
rabbitmq:
host: ${spring.rabbitmq.host}
port: ${spring.rabbitmq.port}
username: ${spring.rabbitmq.username}
password: ${spring.rabbitmq.password}
rabbit:
bindings:
input:
consumer:
# maxumum concurrency of this consumer (threads)
max-concurrency: 50
# number of prefetched messages pre consumer thread
prefetch: 100
# true to requeue rejected messages, false to discard (or route to DLQ)
requeue-rejected: false
# republish failures to the DLQ with diagnostic headers
republish-to-dlq: true
rabbitmq:
host: rabbitmq
port: 5672
username: guest
password: guest
redis:
clusterWhether: false
cluster:
max-redirects: 3
nodes:
- redis:6379
database: 0
host: redis
port: 6379
password: QpUd11WzsuBV3RZd
lettuce:
pool:
max-active: -1
max-wait: -1
max-idle: 8
min-idle: 0
timeout: 50000
ip:
exprie: 600
prohibition: 600
datasource:
url: jdbc:mysql://172.18.101.171:3306/dzqd?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&allowPublicKeyRetrieval=true
username: root
password: AMrGBg6ZSsRrDLs6
filters: wall,mergeStat
max-active: 20
devtools:
restart:
enabled: false
additional-paths: src/main/java
exclude: static/**,WEB-INF/view/**
servlet:
multipart:
enabled: true
max-request-size: 100MB
max-file-size: 100MB
application:
name: task
feign:
hystrix:
enabled: true
httpclient:
enabled: true
okhttp:
enabled: false
ribbon:
MaxAutoRetries: 0
MaxAutoRetriesNextServer: 0
ReadTimeout: 4400
ConnectTimeout: 2000
hystrix:
threadpool:
default:
coreSize: 100
maximumSize: 100
allowMaximumSizeToDivergeFromCoreSize: true
maxQueueSize: 20000
queueSizeRejectionThreshold: 19999
command:
#default全局有效,service id指定应用有效
default:
circuitBreaker:
enabled: false
execution:
timeout:
#如果enabled设置为false,则请求超时交给ribbon控制,为true,则超时作为熔断根据
enabled: true
isolation:
thread:
#断路器超时时间,默认1000ms
timeoutInMilliseconds: 4500
mybatis-plus:
typeAliasesPackage: com.winsun.bean,com.winsun.framework.core.node
mapper-locations:
- com/winsun/mapper/mapping/*.xml
- com/winsun/modular/dao/mapping/*.xml
management:
endpoints:
web:
exposure:
include: bus-refresh
\ No newline at end of file
eureka:
instance:
hostname: localhost
# 心跳时间,即服务续约间隔时间(缺省为30s)
lease-renewal-interval-in-seconds: 10
# 发呆时间,即服务续约到期时间(缺省为90s)
lease-expiration-duration-in-seconds: 20
client:
registry-fetch-interval-seconds: 5
serviceUrl:
defaultZone: http://localhost:20000/eureka/
server:
port: 11191
servlet:
context-path: /ciop
tomcat:
uri-encoding: UTF-8
max-threads: 200
max-connections: 2000
winsun:
app:
version: @project.version@
name: ${spring.application.name}
scanner: false
auth:
#鉴权地址
serviceId: core
#是否开启swagger (true/false)
swagger-open: true
#是否开启登录时验证码 (true/false)
kaptcha-open: false
#是否开启spring session,如果是多机环境需要开启(true/false)
spring-session-open: false
redis-session-expire: 86400
#session失效时间(只在单机环境下生效,多机环境在SpringSessionConfig类中配置) 单位:秒
session-invalidate-time: 1800
#多久检测一次失效的session(只在单机环境下生效) 单位:秒
session-validation-interval: 900
fileUploadPath: tmpUpload/
spring:
profiles:
active: local
quartz:
job-store-type: jdbc
jdbc:
initialize-schema: never
properties:
org:
quartz:
scheduler:
instanceName: DefaultQuartzScheduler
instanceId: AUTO
jobStore:
dataSource: default
class: org.quartz.impl.jdbcjobstore.JobStoreTX
driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
tablePrefix: QRTZ_
isClustered: false
clusterCheckinInterval: 10000
useProperties: true
misfireThreshold: 5000
threadPool:
class: org.quartz.simpl.SimpleThreadPool
threadCount: 10
threadPriority: 5
threadsInheritContextClassLoaderOfInitializingThread: true
cloud:
stream:
bindings:
menuOutput:
destination: queue.menu.messages
binder: local_rabbit
content-type: application/json
binders:
local_rabbit:
type: rabbit
environment:
spring:
rabbitmq:
host: ${spring.rabbitmq.host}
port: ${spring.rabbitmq.port}
username: ${spring.rabbitmq.username}
password: ${spring.rabbitmq.password}
rabbit:
bindings:
input:
consumer:
# maxumum concurrency of this consumer (threads)
max-concurrency: 50
# number of prefetched messages pre consumer thread
prefetch: 100
# true to requeue rejected messages, false to discard (or route to DLQ)
requeue-rejected: false
# republish failures to the DLQ with diagnostic headers
republish-to-dlq: true
rabbitmq:
host: localhost
port: 5672
username: guest
password: guest
redis:
# 是否使用集群模式
clusterWhether: false
cluster:
max-redirects: 3
nodes:
- localhost:6379
database: 0
host: localhost
port: 6379
password:
lettuce:
pool:
max-active: -1
max-wait: -1
max-idle: 8
min-idle: 0
timeout: 50000
ip:
exprie: 600
prohibition: 600
datasource:
url: jdbc:mysql://172.18.101.171:3306/dzqd?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&allowPublicKeyRetrieval=true
username: root
password: AMrGBg6ZSsRrDLs6
filters: wall,mergeStat
max-active: 20
devtools:
restart:
enabled: false
additional-paths: src/main/java
exclude: static/**,WEB-INF/view/**
servlet:
multipart:
enabled: true
max-request-size: 100MB
max-file-size: 100MB
application:
name: task
feign:
hystrix:
enabled: true
httpclient:
enabled: true
okhttp:
enabled: false
ribbon:
MaxAutoRetries: 0
MaxAutoRetriesNextServer: 0
ReadTimeout: 4400
ConnectTimeout: 2000
hystrix:
threadpool:
default:
coreSize: 100
maximumSize: 100
allowMaximumSizeToDivergeFromCoreSize: true
maxQueueSize: 20000
queueSizeRejectionThreshold: 19999
command:
#default全局有效,service id指定应用有效
default:
circuitBreaker:
enabled: false
execution:
timeout:
#如果enabled设置为false,则请求超时交给ribbon控制,为true,则超时作为熔断根据
enabled: true
isolation:
thread:
#断路器超时时间,默认1000ms
timeoutInMilliseconds: 4500
mybatis-plus:
typeAliasesPackage: com.winsun.mapper.task
mapper-locations:
- com/winsun/mapper/mapping/*.xml
- com/winsun/modular/dao/mapping/*.xml
management:
endpoints:
web:
exposure:
include: bus-refresh
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!-- RollingRandomAccessFile的属性:
fileName 指定当前日志文件的位置和文件名称
filePattern 指定当发生Rolling时,文件的转移和重命名规则
SizeBasedTriggeringPolicy 指定当文件体积大于size指定的值时,触发Rolling
DefaultRolloverStrategy 指定最多保存的文件个数
TimeBasedTriggeringPolicy 这个配置需要和filePattern结合使用,
注意filePattern中配置的文件重命名规则是${FILE_NAME}-%d{yyyy-MM-dd HH-mm}-%i,最小的时间粒度是mm,即分钟,
TimeBasedTriggeringPolicy指定的size是1,结合起来就是每1分钟生成一个新文件。
如果改成%d{yyyy-MM-dd HH},最小粒度为小时,则每一个小时生成一个文件。 -->
<Configuration status="off" monitorInterval="30">
<properties>
<property name="log_path">logs</property>
</properties>
<Appenders>
<!-- <NoSql name="databaseAppender">
<MongoDb databaseName="db_cloud_device" collectionName="extract-invoice_log"
server="127.0.0.1" port="27017" userName="gzds" password="Gzds1130" />
</NoSql> -->
<!-- 打印台 -->
<Console name="Console" target="SYSTEM_OUT">
<!--控制台只输出level及以上级别的信息-->
<PatternLayout pattern="%date{yyyy-MM-dd HH:mm:ss} %level [%file:%line] - %msg%n"/>
</Console>
<RollingRandomAccessFile name="InfoFile"
fileName="${log_path}/info/info.log"
filePattern="${log_path}/info/info-%d{yyyy-MM-dd}-%i.log">
<Filters>
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="%date{yyyy-MM-dd HH:mm:ss} %level [%file:%line] - %msg%n"/>
<Policies>
<!-- 归档每天的文件 -->
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<!-- 限制单个文件大小 -->
<SizeBasedTriggeringPolicy size="20 MB"/>
</Policies>
<DefaultRolloverStrategy max="30"/>
</RollingRandomAccessFile>
<RollingRandomAccessFile name="WarnFile" fileName="${log_path}/warn/warn.log"
filePattern="${log_path}/error/error-%d{yyyy-MM-dd}-%i.log">
<Filters>
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="%date{yyyy-MM-dd_HH:mm:ss} %level [%file:%line] - %msg%n"/>
<Policies>
<!-- 归档每天的文件 -->
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<!-- 限制单个文件大小 -->
<SizeBasedTriggeringPolicy size="20 MB"/>
</Policies>
<DefaultRolloverStrategy max="30"/>
</RollingRandomAccessFile>
<RollingRandomAccessFile name="ErrorFile"
fileName="${log_path}/error/error.log"
filePattern="${log_path}/error/error-%d{yyyy-MM-dd}-%i.log">
<Filters>
<ThresholdFilter level="fatal" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="%date{yyyy-MM-dd_HH:mm:ss} %level [%file:%line] - %msg%n"/>
<Policies>
<!-- 归档每天的文件 -->
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<!-- 限制单个文件大小 -->
<SizeBasedTriggeringPolicy size="20 MB"/>
</Policies>
<DefaultRolloverStrategy max="30"/>
</RollingRandomAccessFile>
</Appenders>
<Loggers>
<Root level="info">
<appender-ref ref="Console"/>
<appender-ref ref="InfoFile"/>
<appender-ref ref="WarnFile"/>
<appender-ref ref="ErrorFile"/>
</Root>
</Loggers>
</Configuration>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
# Created by .ignore support plugin (hsz.mobi)
### Example user template template
### Example user template
# IntelliJ project files
.idea
*.iml
out
gen
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.winsun.gdtel.gztel</groupId>
<artifactId>gdtel-gztel-school-center</artifactId>
<version>0.0.2</version>
<modules>
<module>gdtel-gztel-jyyy-service-manager</module>
<module>gdtel-gztel-jyyy-core-service</module>
<module>gdtel-gztel-jyyy-gateway</module>
<module>gdtel-gztel-jyyy-eureka</module>
<module>gdtel-gztel-jyyy-task</module>
</modules>
<packaging>pom</packaging>
<description>外呼集约系统聚合</description>
<parent>
<groupId>com.winsun.framework</groupId>
<artifactId>winsun-parent</artifactId>
<version>0.1.45</version>
</parent>
<properties>
<gdtel-jyyy-service.version>0.0.1</gdtel-jyyy-service.version>
<commons-net.version>3.3</commons-net.version>
<p6spy.version>3.8.0</p6spy.version>
<dynamic-datasource.version>2.5.6</dynamic-datasource.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.winsun.framework</groupId>
<artifactId>winsun-core-common</artifactId>
<version>${winsun-framework.version}</version>
</dependency>
<dependency>
<groupId>com.winsun.framework</groupId>
<artifactId>winsun-core-service</artifactId>
<version>${winsun-framework.version}</version>
</dependency>
<dependency>
<groupId>com.winsun.framework</groupId>
<artifactId>winsun-core-task</artifactId>
<version>${winsun-framework.version}</version>
</dependency>
<dependency>
<groupId>com.winsun.framework</groupId>
<artifactId>winsun-core-api</artifactId>
<version>${winsun-framework.version}</version>
</dependency>
<dependency>
<groupId>com.winsun.framework</groupId>
<artifactId>winsun-eureka</artifactId>
<version>${winsun-framework.version}</version>
</dependency>
<dependency>
<artifactId>p6spy</artifactId>
<groupId>p6spy</groupId>
<version>${p6spy.version}</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
<version>${dynamic-datasource.version}</version>
</dependency>
<dependency>
<artifactId>druid-spring-boot-starter</artifactId>
<groupId>com.alibaba</groupId>
<version>${druid.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<distributionManagement>
<repository>
<id>releases</id>
<url>http://172.18.101.172:8081/nexus/content/repositories/releases</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<url>http://172.18.101.172:8081/nexus/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
<repositories>
<repository>
<id>nexus</id>
<url>http://172.18.101.172:8081/nexus/content/groups/public/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</project>
\ 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