diff --git a/mallinkSchedule/pom.xml b/mallinkSchedule/pom.xml new file mode 100644 index 000000000..6464e21a8 --- /dev/null +++ b/mallinkSchedule/pom.xml @@ -0,0 +1,35 @@ + + + 4.0.0 + + + mallink + com.iformall + 1.0 + + + mallinkSchedule + + + + com.iformall + mallinkService + 1.0 + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + true + + + + + + \ No newline at end of file diff --git a/mallinkSchedule/src/main/java/com/iformall/ScheduleApplication.java b/mallinkSchedule/src/main/java/com/iformall/ScheduleApplication.java new file mode 100644 index 000000000..c9ab711ec --- /dev/null +++ b/mallinkSchedule/src/main/java/com/iformall/ScheduleApplication.java @@ -0,0 +1,22 @@ +package com.iformall; + +import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import springfox.documentation.swagger2.annotations.EnableSwagger2; +import tk.mybatis.spring.annotation.MapperScan; + +/** + * @author chenkx + * @date 2017-12-26 + */ +@SpringBootApplication +@MapperScan(basePackages = {"com.iformall.mapper"}) +@EnableSwagger2 +@EnableEncryptableProperties +public class ScheduleApplication { + + public static void main(String[] args) { + SpringApplication.run(ScheduleApplication.class, args); + } +} diff --git a/mallinkSchedule/src/main/java/com/iformall/config/AwsProperty.java b/mallinkSchedule/src/main/java/com/iformall/config/AwsProperty.java new file mode 100644 index 000000000..0329f1d6d --- /dev/null +++ b/mallinkSchedule/src/main/java/com/iformall/config/AwsProperty.java @@ -0,0 +1,52 @@ +package com.iformall.config; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.stereotype.Component; + +/** + * @author Stormeye + */ +@Component +@ConfigurationProperties(prefix = "aws") +public class AwsProperty { + // AWS ACCESS KEY + private String access; + + private String secret; + + private String clientRegion; + + private String bucketName; + + public String getAccess() { + return access; + } + + public void setAccess(String access) { + this.access = access; + } + + public String getSecret() { + return secret; + } + + public void setSecret(String secret) { + this.secret = secret; + } + + public String getClientRegion() { + return clientRegion; + } + + public void setClientRegion(String clientRegion) { + this.clientRegion = clientRegion; + } + + public String getBucketName() { + return bucketName; + } + + public void setBucketName(String bucketName) { + this.bucketName = bucketName; + } +} diff --git a/mallinkSchedule/src/main/java/com/iformall/config/PayProperty.java b/mallinkSchedule/src/main/java/com/iformall/config/PayProperty.java new file mode 100644 index 000000000..5cb7f4915 --- /dev/null +++ b/mallinkSchedule/src/main/java/com/iformall/config/PayProperty.java @@ -0,0 +1,24 @@ +package com.iformall.config; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.stereotype.Component; + +/** + * @author Stormeye + */ +@Component +@ConfigurationProperties(prefix = "pay") +public class PayProperty { + /** + * 真实支付 + */ + private boolean real; + + public boolean isReal() { + return real; + } + + public void setReal(boolean real) { + this.real = real; + } +} diff --git a/mallinkSchedule/src/main/java/com/iformall/config/RedisConfig.java b/mallinkSchedule/src/main/java/com/iformall/config/RedisConfig.java new file mode 100644 index 000000000..2e6e9bc63 --- /dev/null +++ b/mallinkSchedule/src/main/java/com/iformall/config/RedisConfig.java @@ -0,0 +1,112 @@ +package com.iformall.config; + +import com.iformall.domain.po.PushLimit; +import com.iformall.domain.po.WxScoreRules; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.cache.CacheManager; +import org.springframework.cache.annotation.CachingConfigurerSupport; +import org.springframework.cache.annotation.EnableCaching; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.data.redis.cache.RedisCacheConfiguration; +import org.springframework.data.redis.cache.RedisCacheManager; +import org.springframework.data.redis.cache.RedisCacheWriter; +import org.springframework.data.redis.connection.RedisConnectionFactory; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer; +import org.springframework.data.redis.serializer.StringRedisSerializer; + +import java.time.Duration; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +/** + * Created by Stormeye on 2018/10/1. + */ +@Configuration +@EnableCaching +public class RedisConfig extends CachingConfigurerSupport { + + private final Logger logger = LoggerFactory.getLogger(this.getClass()); + + //缓存管理器 + @Bean + public CacheManager cacheManager(RedisConnectionFactory connectionFactory) { + /* + //user信息缓存配置 + RedisCacheConfiguration userCacheConfiguration = RedisCacheConfiguration.defaultCacheConfig().entryTtl(Duration.ofSeconds(10)).disableCachingNullValues().prefixKeysWith("user"); + Map redisCacheConfigurationMap = new HashMap<>(); + redisCacheConfigurationMap.put("user", userCacheConfiguration); + //初始化一个RedisCacheWriter + RedisCacheWriter redisCacheWriter = RedisCacheWriter.nonLockingRedisCacheWriter(connectionFactory); + // 设置CacheManager的值序列化方式为JdkSerializationRedisSerializer,但其实RedisCacheConfiguration默认就是使用StringRedisSerializer序列化key,JdkSerializationRedisSerializer序列化value,所以以下注释代码为默认实现 + // ClassLoader loader = this.getClass().getClassLoader(); + // JdkSerializationRedisSerializer jdkSerializer = new JdkSerializationRedisSerializer(loader); + // RedisSerializationContext.SerializationPair pair = RedisSerializationContext.SerializationPair.fromSerializer(jdkSerializer); + // RedisCacheConfiguration defaultCacheConfig = RedisCacheConfiguration.defaultCacheConfig().serializeValuesWith(pair); + RedisCacheConfiguration defaultCacheConfig = RedisCacheConfiguration.defaultCacheConfig(); + //设置默认超过期时间是30秒 + defaultCacheConfig.entryTtl(Duration.ofSeconds(30)); + //初始化RedisCacheManager + RedisCacheManager cacheManager = new RedisCacheManager(redisCacheWriter, defaultCacheConfig, redisCacheConfigurationMap); + return cacheManager; + */ + RedisCacheConfiguration config = RedisCacheConfiguration.defaultCacheConfig(); // 生成一个默认配置,通过config对象即可对缓存进行自定义配置 + config = config.entryTtl(Duration.ofMinutes(1)) // 设置缓存的默认过期时间,也是使用Duration设置 + .disableCachingNullValues(); // 不缓存空值 + + // 设置一个初始化的缓存空间set集合 + Set cacheNames = new HashSet<>(); + cacheNames.add("my-redis-cache1"); + cacheNames.add("my-redis-cache2"); + + // 对每个缓存空间应用不同的配置 + Map configMap = new HashMap<>(); + configMap.put("my-redis-cache1", config); + configMap.put("my-redis-cache2", config.entryTtl(Duration.ofSeconds(120))); + + RedisCacheManager cacheManager = RedisCacheManager.builder(connectionFactory) // 使用自定义的缓存配置初始化一个cacheManager + .initialCacheNames(cacheNames) // 注意这两句的调用顺序,一定要先调用该方法设置初始化的缓存名,再初始化相关的配置 + .withInitialCacheConfigurations(configMap) + .build(); + return cacheManager; + } + + @Bean("pushLimitRedisTemplate") + public RedisTemplate getPushLimitRedisTemplate(RedisConnectionFactory connectionFactory) { + RedisTemplate template = new RedisTemplate(); + + Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(PushLimit.class); + // value值的序列化 + template.setValueSerializer(j); + template.setHashKeySerializer(j); + + // key的序列化 + template.setKeySerializer(new StringRedisSerializer()); + template.setHashKeySerializer(new StringRedisSerializer()); + + template.setConnectionFactory(connectionFactory); + return template; + } + + @Bean("scoreRuleRedisTemplate") + public RedisTemplate getScoreRuleRedisTemplate(RedisConnectionFactory connectionFactory) { + RedisTemplate template = new RedisTemplate(); + + Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(WxScoreRules.class); + // value值的序列化 + template.setValueSerializer(j); + template.setHashKeySerializer(j); + + // key的序列化 + template.setKeySerializer(new StringRedisSerializer()); + template.setHashKeySerializer(new StringRedisSerializer()); + + template.setConnectionFactory(connectionFactory); + return template; + } + +} diff --git a/mallinkSchedule/src/main/java/com/iformall/config/RestFilter.java b/mallinkSchedule/src/main/java/com/iformall/config/RestFilter.java new file mode 100644 index 000000000..4f9298433 --- /dev/null +++ b/mallinkSchedule/src/main/java/com/iformall/config/RestFilter.java @@ -0,0 +1,58 @@ +package com.iformall.config; + +import java.io.IOException; +import java.util.Optional; + +import javax.servlet.Filter; +import javax.servlet.FilterChain; +import javax.servlet.FilterConfig; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * 前后端分离RESTful接口过滤器 + * + * @author xuguoqin + * + */ +public class RestFilter implements Filter { + + @Override + public void init(FilterConfig filterConfig) throws ServletException { + + } + + @Override + public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) + throws IOException, ServletException { + HttpServletRequest req = null; + if (request instanceof HttpServletRequest) { + req = (HttpServletRequest) request; + } + HttpServletResponse res = null; + if (response instanceof HttpServletResponse) { + res = (HttpServletResponse) response; + } + if (req != null && res != null) { + //设置允许传递的参数 + res.setHeader("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, Authorization"); + //设置允许带上cookie + res.setHeader("Access-Control-Allow-Credentials", "true"); + String origin = Optional.ofNullable(req.getHeader("Origin")).orElse(req.getHeader("Referer")); + //设置允许的请求来源 + res.setHeader("Access-Control-Allow-Origin", origin); + //设置允许的请求方法 + res.setHeader("Access-Control-Allow-Methods", "GET, POST, PATCH, PUT, DELETE, OPTIONS"); + } + chain.doFilter(request, response); + } + + @Override + public void destroy() { + + } + +} \ No newline at end of file diff --git a/mallinkSchedule/src/main/java/com/iformall/config/RestTemplateConfig.java b/mallinkSchedule/src/main/java/com/iformall/config/RestTemplateConfig.java new file mode 100644 index 000000000..560a77cb5 --- /dev/null +++ b/mallinkSchedule/src/main/java/com/iformall/config/RestTemplateConfig.java @@ -0,0 +1,24 @@ +package com.iformall.config; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.http.client.ClientHttpRequestFactory; +import org.springframework.http.client.SimpleClientHttpRequestFactory; +import org.springframework.web.client.RestTemplate; + +@Configuration +public class RestTemplateConfig { + + @Bean + public RestTemplate restTemplate(ClientHttpRequestFactory factory) { + return new RestTemplate(factory); + } + + @Bean + public ClientHttpRequestFactory simpleClientHttpRequestFactory() { + SimpleClientHttpRequestFactory factory = new SimpleClientHttpRequestFactory(); + factory.setReadTimeout(5000);//ms + factory.setConnectTimeout(10000);//ms + return factory; + } +} \ No newline at end of file diff --git a/mallinkSchedule/src/main/java/com/iformall/config/WebConfig.java b/mallinkSchedule/src/main/java/com/iformall/config/WebConfig.java new file mode 100644 index 000000000..48708f36e --- /dev/null +++ b/mallinkSchedule/src/main/java/com/iformall/config/WebConfig.java @@ -0,0 +1,79 @@ +package com.iformall.config; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.DeserializationConfig; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.module.SimpleModule; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import org.springframework.context.annotation.Configuration; +import org.springframework.http.converter.HttpMessageConverter; +import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; +import org.springframework.web.servlet.config.annotation.CorsRegistry; +import org.springframework.web.servlet.config.annotation.EnableWebMvc; +import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +import java.math.BigDecimal; +import java.math.BigInteger; +import java.text.SimpleDateFormat; +import java.util.List; + +@Configuration +@EnableWebMvc +public class WebConfig implements WebMvcConfigurer { + + @Override + public void addResourceHandlers(ResourceHandlerRegistry registry) { + registry.addResourceHandler("swagger-ui.html") + .addResourceLocations("classpath:/META-INF/resources/"); + registry.addResourceHandler("/webjars/**") + .addResourceLocations("classpath:/META-INF/resources/webjars/"); + //registry.addResourceHandler("/app/**").addResourceLocations("classpath:/app/"); + + } + + @Override + public void addCorsMappings(CorsRegistry registry) { + registry.addMapping("/**") + .allowedOrigins("*") + .allowCredentials(true) + .allowedMethods("GET", "POST", "DELETE", "PUT") + .maxAge(3600); + } + + @Override + public void configureMessageConverters(List> converters) { + MappingJackson2HttpMessageConverter jackson2HttpMessageConverter = new MappingJackson2HttpMessageConverter(); + //ObjectMapper 是Jackson库的主要类。它提供一些功能将转换成Java对象匹配JSON结构,反之亦然 + ObjectMapper objectMapper = new ObjectMapper(); + SimpleModule simpleModule = new SimpleModule(); + + //不显示为null的字段 + objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); + + DeserializationConfig dc = objectMapper.getDeserializationConfig(); + // 设置反序列化日期格式、忽略不存在get、set的属性 + objectMapper.setConfig( + dc.with(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")) + .without(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + ); + + //序列化将Long转String类型 + simpleModule.addSerializer(Long.class, ToStringSerializer.instance); + simpleModule.addSerializer(Long.TYPE, ToStringSerializer.instance); + SimpleModule bigIntegerModule = new SimpleModule(); + //序列化将BigInteger转String类型 + bigIntegerModule.addSerializer(BigInteger.class, ToStringSerializer.instance); + SimpleModule bigDecimalModule = new SimpleModule(); + //序列化将BigDecimal转String类型 + bigDecimalModule.addSerializer(BigDecimal.class, ToStringSerializer.instance); + objectMapper.registerModule(simpleModule); + objectMapper.registerModule(bigDecimalModule); + objectMapper.registerModule(bigIntegerModule); + jackson2HttpMessageConverter.setObjectMapper(objectMapper); + converters.add(jackson2HttpMessageConverter); + } + + +} diff --git a/mallinkAdmin/src/main/java/com/iformall/schedule/CouponExpiringSchedule.java b/mallinkSchedule/src/main/java/com/iformall/schedule/CouponExpiringSchedule.java similarity index 100% rename from mallinkAdmin/src/main/java/com/iformall/schedule/CouponExpiringSchedule.java rename to mallinkSchedule/src/main/java/com/iformall/schedule/CouponExpiringSchedule.java diff --git a/mallinkAdmin/src/main/java/com/iformall/schedule/CouponOrderExpiringSchedule.java b/mallinkSchedule/src/main/java/com/iformall/schedule/CouponOrderExpiringSchedule.java similarity index 100% rename from mallinkAdmin/src/main/java/com/iformall/schedule/CouponOrderExpiringSchedule.java rename to mallinkSchedule/src/main/java/com/iformall/schedule/CouponOrderExpiringSchedule.java diff --git a/mallinkAdmin/src/main/java/com/iformall/schedule/DaliyAmountSchedule.java b/mallinkSchedule/src/main/java/com/iformall/schedule/DaliyAmountSchedule.java similarity index 100% rename from mallinkAdmin/src/main/java/com/iformall/schedule/DaliyAmountSchedule.java rename to mallinkSchedule/src/main/java/com/iformall/schedule/DaliyAmountSchedule.java diff --git a/mallinkAdmin/src/main/java/com/iformall/schedule/MsgSendingSchedule.java b/mallinkSchedule/src/main/java/com/iformall/schedule/MsgSendingSchedule.java similarity index 100% rename from mallinkAdmin/src/main/java/com/iformall/schedule/MsgSendingSchedule.java rename to mallinkSchedule/src/main/java/com/iformall/schedule/MsgSendingSchedule.java diff --git a/mallinkAdmin/src/main/java/com/iformall/schedule/OrderExpiringSchedule.java b/mallinkSchedule/src/main/java/com/iformall/schedule/OrderExpiringSchedule.java similarity index 100% rename from mallinkAdmin/src/main/java/com/iformall/schedule/OrderExpiringSchedule.java rename to mallinkSchedule/src/main/java/com/iformall/schedule/OrderExpiringSchedule.java diff --git a/mallinkAdmin/src/main/java/com/iformall/schedule/SchedulingConfig.java b/mallinkSchedule/src/main/java/com/iformall/schedule/SchedulingConfig.java similarity index 100% rename from mallinkAdmin/src/main/java/com/iformall/schedule/SchedulingConfig.java rename to mallinkSchedule/src/main/java/com/iformall/schedule/SchedulingConfig.java diff --git a/mallinkAdmin/src/main/java/com/iformall/schedule/WxAppVisitSchedule.java b/mallinkSchedule/src/main/java/com/iformall/schedule/WxAppVisitSchedule.java similarity index 100% rename from mallinkAdmin/src/main/java/com/iformall/schedule/WxAppVisitSchedule.java rename to mallinkSchedule/src/main/java/com/iformall/schedule/WxAppVisitSchedule.java diff --git a/mallinkSchedule/src/main/resources/application-dev.yml b/mallinkSchedule/src/main/resources/application-dev.yml new file mode 100644 index 000000000..48a0854af --- /dev/null +++ b/mallinkSchedule/src/main/resources/application-dev.yml @@ -0,0 +1,46 @@ +spring: + # JDBC + datasource: + url: jdbc:mysql://202.165.179.86:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false + username: ENC(dZ8fmrtuBMQYaRytKQgTqg==) + password: ENC(OZXsE6/Tj+V1Yu2wdjnIGbNOaBVQzi9W) + type: com.alibaba.druid.pool.DruidDataSource + driver-class-name: com.mysql.cj.jdbc.Driver + filters: stat + maxActive: 20 + initialSize: 1 + maxWait: 60000 + minIdle: 1 + timeBetweenEvictionRunsMillis: 60000 + minEvictableIdleTimeMillis: 300000 + validationQuery: select 'x' + testWhileIdle: true + testOnBorrow: false + testOnReturn: false + poolPreparedStatements: true + maxOpenPreparedStatements: 20 + connectionProperties: "druid.stat.mergeSql=true;druid.stat.slowSqlMillis=6000" + #jackson: + #date-format: yyyy-MM-dd HH:mm:ss + + # REDIS + redis: + host: 202.165.179.86 + port: 6379 + password: ENC(aYJ3Wr2UWtkORRQjjrWWpz2ZeTISsHOA) + timeout: 3600 + expire: 1800 #30分钟 + database: 1 + defaultExpiration: 2592000 # 默认生命周期30天 + jedis: + pool: + max-active: 100 + max-idle: 500 + max-wait: -1 + min-idle: 10 + +logging: + level: + tk.mybatis: debug + com.iformall.mapper: debug + path: ./logs/admin diff --git a/mallinkSchedule/src/main/resources/application-prod.yml b/mallinkSchedule/src/main/resources/application-prod.yml new file mode 100644 index 000000000..226f71455 --- /dev/null +++ b/mallinkSchedule/src/main/resources/application-prod.yml @@ -0,0 +1,42 @@ +spring: + # JDBC + datasource: + url: jdbc:mysql://formalldb.cfqyqflkdlit.rds.cn-northwest-1.amazonaws.com.cn:3306/mallink?characterEncoding=UTF-8 + username: ENC(BDv01/sQdBGEhFEXuw+8tw==) + password: ENC(0wvpX49+RMUpGP2tb9PY4ta/yCwAmLLhbKG9ndvifPI=) + type: com.alibaba.druid.pool.DruidDataSource + driver-class-name: com.mysql.cj.jdbc.Driver + filters: stat + maxActive: 20 + initialSize: 1 + maxWait: 60000 + minIdle: 1 + timeBetweenEvictionRunsMillis: 60000 + minEvictableIdleTimeMillis: 300000 + validationQuery: select 'x' + testWhileIdle: true + testOnBorrow: false + testOnReturn: false + poolPreparedStatements: true + maxOpenPreparedStatements: 20 + connectionProperties: "druid.stat.mergeSql=true;druid.stat.slowSqlMillis=6000" + # REDIS + redis: + host: 202.165.179.86 + port: 6379 + password: ENC(YOLO4buIPjiYfosG+Akk3XZ9HYrbCFco) + timeout: 3600 + expire: 1800 #30分钟 + database: 1 + jedis: + pool: + max-active: 8 + max-idle: 8 + max-wait: -1 + min-idle: 0 + +logging: + level: + tk.mybatis: debug + com.iformall.mapper: debug + path: ./logs/admin \ No newline at end of file diff --git a/mallinkSchedule/src/main/resources/application.yml b/mallinkSchedule/src/main/resources/application.yml new file mode 100644 index 000000000..0e4a923e7 --- /dev/null +++ b/mallinkSchedule/src/main/resources/application.yml @@ -0,0 +1,65 @@ +server: + port: 5000 + servlet: + context-path: / + +spring: + application: + name: mallink + profiles: + active: dev + jackson: + date-format: yyyy-MM-dd HH:mm:ss + time-zone: GMT+8 + default-property-inclusion: non_null + servlet: + multipart: + max-file-size: 2MB + max-request-size: 2MB + cache: + type: REDIS + cache-names: redis_cache #缓存的名字(可以不指定) + redis: + time-to-live: 60000ms #很重要,缓存的有效时间,以便缓存的过期(单位为毫秒) + + +# @{link} https://github.com/abel533 +#Mybatis +mybatis: + type-aliases-package: com.iformall.domain.po + mapper-locations: classpath:mapper/*Mapper.xml + configuration: + map-underscore-to-camel-case: true + cache-enabled: true + lazy-loading-enabled: true + use-generated-keys: true + default-fetch-size: 100 + +#PageHelper +pagehelper: + helperDialect: mysql + reasonable: false + supportMethodsArguments: true + params: count=countSql + offset-as-page-num: true + page-size-zero: true + row-bounds-with-count: true + +mapper: + mappers: + - com.iformall.common.CommonMapper + +pay: + real: true + +aws: + clientRegion: cn-northwest-1 + bucketName: iformall-net + access: ENC(3gx5ghDFBqGrEhO3Wf8aYmXsnwHO7Cj3HNKJGOeUj0o=) + secret: ENC(HVKIJwCJKVXLlUpGlQPwNqJOlnpxn4xYuy91SH0seTSm2uAttIQHvA49fXWWax90v5wloIk0QuU=) + +jasypt: + encryptor: + password: oRqdnDbK5pj3eMmB + +version: @project.version@ \ No newline at end of file diff --git a/mallinkSchedule/src/main/resources/logback-spring.xml b/mallinkSchedule/src/main/resources/logback-spring.xml new file mode 100644 index 000000000..0499e2c57 --- /dev/null +++ b/mallinkSchedule/src/main/resources/logback-spring.xml @@ -0,0 +1,100 @@ + + + + + + + + [%date{yyyy-MM-dd HH:mm:ss}] [%-5level] --%mdc{client}%msg%n + + + + + ${logPath}/trace.log + + ${logPath}/daily/trace.%d{yyyy-MM-dd}.log + 180 + + + [%date{yyyy-MM-dd HH:mm:ss}] [%-5level] [%logger:%line]--%mdc{client} %msg%n + + + + + ${logPath}/info.log + + ${logPath}/daily/info.%d{yyyy-MM-dd}.log + 180 + + + [%date{yyyy-MM-dd HH:mm:ss}] [%-5level] [%logger:%line]--%mdc{client} %msg%n + + + INFO + ACCEPT + DENY + + + + + ${logPath}/debug.log + + ${logPath}/daily/debug.%d{yyyy-MM-dd}.log + 180 + + + [%date{yyyy-MM-dd HH:mm:ss}] [%-5level] [%logger:%line]--%mdc{client} %msg%n + + + DEBUG + ACCEPT + DENY + + + + + + ${logPath}/warn.log + + ${logPath}/daily/warn.%d{yyyy-MM-dd}.log + 180 + + + [%date{yyyy-MM-dd HH:mm:ss}] [%-5level] [%logger:%line]--%mdc{client} %msg%n + + + WARN + ACCEPT + DENY + + + + + + + ${logPath}/error.log + + ${logPath}/daily/error.%d{yyyy-MM-dd}.log + 180 + + + [%date{yyyy-MM-dd HH:mm:ss}] [%-5level] [%logger:%line]--%mdc{client} %msg%n + + + ERROR + ACCEPT + DENY + + + + + + + + + + + + + + \ No newline at end of file