diff --git a/src/main/java/com/kwan/springbootkwan/config/MyInterceptor.java b/src/main/java/com/kwan/springbootkwan/config/MyInterceptor.java index 9b0d45cb18325a2acc0d1bdc04e8cdc5b4d1b516..9225864a7f51c77118a28bd9fad1418226b98487 100644 --- a/src/main/java/com/kwan/springbootkwan/config/MyInterceptor.java +++ b/src/main/java/com/kwan/springbootkwan/config/MyInterceptor.java @@ -1,5 +1,6 @@ package com.kwan.springbootkwan.config; +import lombok.extern.slf4j.Slf4j; import org.springframework.web.servlet.HandlerInterceptor; import org.springframework.web.servlet.ModelAndView; @@ -13,21 +14,22 @@ import javax.servlet.http.HttpServletResponse; * @version : 2.2.0 * @date : 2022/12/19 16:14 */ +@Slf4j public class MyInterceptor implements HandlerInterceptor { @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { - System.out.println("MyInterceptor>>>>>>>>>preHandle"); + log.info("MyInterceptor>>>>>>>>>preHandle"); return true; } @Override public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception { - System.out.println("MyInterceptor>>>>>>>>>postHandle"); + log.info("MyInterceptor>>>>>>>>>postHandle"); } @Override public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception { - System.out.println("MyInterceptor>>>>>>>>>afterCompletion"); + log.info("MyInterceptor>>>>>>>>>afterCompletion"); } } diff --git a/src/main/java/com/kwan/springbootkwan/config/RedisConfig.java b/src/main/java/com/kwan/springbootkwan/config/RedisConfig.java index 1c18b95b87a883ef166e400a13c176042476abd6..f69421fef3ba4f23664eb796e649850ab34fccc1 100644 --- a/src/main/java/com/kwan/springbootkwan/config/RedisConfig.java +++ b/src/main/java/com/kwan/springbootkwan/config/RedisConfig.java @@ -3,6 +3,7 @@ package com.kwan.springbootkwan.config; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.PropertyAccessor; import com.fasterxml.jackson.databind.ObjectMapper; +import lombok.extern.slf4j.Slf4j; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.data.redis.connection.RedisConnectionFactory; @@ -10,13 +11,14 @@ import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer; import org.springframework.data.redis.serializer.StringRedisSerializer; +@Slf4j @Configuration public class RedisConfig { @Bean @SuppressWarnings("all") public RedisTemplate redisTemplate(RedisConnectionFactory factory) { - System.out.println("==================自定义的redisTemplate实例化了==================="); + log.info("==================自定义的redisTemplate实例化了==================="); RedisTemplate template = new RedisTemplate(); template.setConnectionFactory(factory); Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class); diff --git a/src/main/java/com/kwan/springbootkwan/entity/AdsDimFinancialYearWeekInfo.java b/src/main/java/com/kwan/springbootkwan/entity/AdsDimFinancialYearWeekInfo.java index 888c3000200f6302622782be4ff1936ef03a5f1c..3effae9109ae9654cd150ccb3ec3c72e7bd68372 100644 --- a/src/main/java/com/kwan/springbootkwan/entity/AdsDimFinancialYearWeekInfo.java +++ b/src/main/java/com/kwan/springbootkwan/entity/AdsDimFinancialYearWeekInfo.java @@ -1,92 +1,34 @@ package com.kwan.springbootkwan.entity; - -import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.extension.activerecord.Model; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; import java.util.Date; - -@TableName(value = "ads_dim_financial_year_week_info") +@Data @ApiModel(value = "财年周") public class AdsDimFinancialYearWeekInfo extends Model { - //财年 + @TableId + @ApiModelProperty(value = "财年") private Integer financialYear; - //第n财年周 + @ApiModelProperty(value = "第n财年周") private Integer financialYearWeek; - //财年开始日期 + @ApiModelProperty(value = "财年开始日期") @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date financialYearStart; - //财年结束日期 @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8") + @ApiModelProperty(value = "财年结束日期") private Date financialYearEnd; - //周开始 @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8") + @ApiModelProperty(value = "周开始") private Date weekStartDay; - //周结束 @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8") + @ApiModelProperty(value = "周结束") private Date weekEndDay; - //财年周所在季节区间,0:跨9月1号,1:3月到8月,2:9月到2月 + @ApiModelProperty(value = "财年周所在季节区间,0:跨9月1号,1:3月到8月,2:9月到2月 ") private Integer weekInSeason; - - - public Integer getFinancialYear() { - return financialYear; - } - - public void setFinancialYear(Integer financialYear) { - this.financialYear = financialYear; - } - - public Integer getFinancialYearWeek() { - return financialYearWeek; - } - - public void setFinancialYearWeek(Integer financialYearWeek) { - this.financialYearWeek = financialYearWeek; - } - - public Date getFinancialYearStart() { - return financialYearStart; - } - - public void setFinancialYearStart(Date financialYearStart) { - this.financialYearStart = financialYearStart; - } - - public Date getFinancialYearEnd() { - return financialYearEnd; - } - - public void setFinancialYearEnd(Date financialYearEnd) { - this.financialYearEnd = financialYearEnd; - } - - public Date getWeekStartDay() { - return weekStartDay; - } - - public void setWeekStartDay(Date weekStartDay) { - this.weekStartDay = weekStartDay; - } - - public Date getWeekEndDay() { - return weekEndDay; - } - - public void setWeekEndDay(Date weekEndDay) { - this.weekEndDay = weekEndDay; - } - - public Integer getWeekInSeason() { - return weekInSeason; - } - - public void setWeekInSeason(Integer weekInSeason) { - this.weekInSeason = weekInSeason; - } - -} - +} \ No newline at end of file diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index 7c3e1b0641c74f671f3cbdb48c54a9f2dfd1af5e..b6639c89d0c5adb1becfb4cf58bec6a4384539dd 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -59,13 +59,15 @@ spring: # url: jdbc:mysql://localhost:3306/kwan?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai url: jdbc:mysql://120.79.36.53:3306/kwan?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai username: root -# password: 716288qwe + # password: 716288qwe password: 15671628341Qwe. ali-ds: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://120.79.36.53:3306/kwan?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai username: root password: 15671628341Qwe. +seata: + tx-service-group: default_tx_group #seata: diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml index 86327aa5ccd3adb3f51a9e3be026eb4ed5ad50b1..bb4e4984fab4be7d437af77174a6615663cdea8f 100644 --- a/src/main/resources/logback-spring.xml +++ b/src/main/resources/logback-spring.xml @@ -1,69 +1,40 @@ - + + + + - - - - - - - - - - - ../logs/springboot-mybatis.log + - - %date [%level] [%thread] %logger{60} [%file : %line] %msg%n - - UTF-8 + ${console.log.pattern} + ${log.charset} - - - - ../logs/springboot-mybatis.log.%d{yyyy-MM-dd}.log - - 30 - - 10GB - - - - - ../logs/error.log - - %date [%level] [%thread] %logger{60} [%file : %line] %msg%n - - UTF-8 - - - - - ../logs/error.%d{yyyy-MM-dd}.log - + + logs/SpringBoot-kwan.log + + + logs/SpringBoot-kwan-%d{yyyy-MM-dd}.%i.log + + 128MB 30 - - 10GB + 20GB - - - ERROR - - ACCEPT - - DENY - + + ${file.log.pattern} + ${log.charset} + - + + + - - - - - + + + - \ No newline at end of file