feat: 重构员工控制器并优化JSON序列化配置
refactor(EmployeeController): 重命名EmployyeController为EmployeeController并优化代码结构 feat(EmployeeController): 添加@JsonIgnoreProperties注解解决循环引用问题 feat(JacksonConfig): 新增Jackson配置类处理Hibernate代理和循环引用 fix(EmployeeService): 修复缓存注解格式问题 feat(Employee): 添加@JsonIgnoreProperties注解忽略可能导致循环引用的字段 feat(EmployeeRole): 添加@JsonIgnore注解忽略关联字段 fix(application.properties): 调整Redis缓存配置和错误处理设置 refactor(IndexController): 移除错误处理方法 feat(GlobalExceptionHandler): 新增全局异常处理类 refactor(SecurityConfig): 优化安全配置并启用方法级安全注解 refactor(AbstractCtx): 优化日期时间处理方法 build: 更新项目版本至0.0.53-SNAPSHOT
This commit is contained in:
@@ -35,13 +35,24 @@ logging.level.org.hibernate.tool.hbm2ddl=DEBUG
|
||||
logging.level.org.springframework.boot.context.metrics.buffering=DEBUG
|
||||
logging.level.com.ecep.contract.manager.SpringApp=DEBUG
|
||||
|
||||
# JSON序列化错误调试日志
|
||||
logging.level.org.springframework.http.converter=DEBUG
|
||||
logging.level.com.fasterxml.jackson=TRACE
|
||||
logging.level.org.springframework.web.servlet.mvc.method.annotation=TRACE
|
||||
|
||||
# Redis缓存配置
|
||||
spring.cache.type=redis
|
||||
spring.cache.redis.time-to-live=6h
|
||||
spring.cache.redis.key-prefix=contract_manager_
|
||||
spring.cache.redis.use-key-prefix=true
|
||||
spring.cache.redis.cache-null-values=false
|
||||
spring.cache.redis.cache-null-values=true
|
||||
|
||||
# Redis序列化配置
|
||||
spring.data.redis.serializer.key=org.springframework.data.redis.serializer.StringRedisSerializer
|
||||
spring.data.redis.serializer.value=org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer
|
||||
spring.data.redis.serializer.value=org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer
|
||||
|
||||
# 禁用默认的Whitelabel错误页面
|
||||
server.error.whitelabel.enabled=false
|
||||
# 设置错误处理路径,确保404等错误能被全局异常处理器捕获
|
||||
spring.mvc.throw-exception-if-no-handler-found=true
|
||||
spring.web.resources.add-mappings=true
|
||||
|
||||
Reference in New Issue
Block a user