提交 | 用户 | 时间
|
e57a89
|
1 |
package com.jcdm.framework.config; |
懒 |
2 |
|
|
3 |
import java.util.TimeZone; |
|
4 |
import org.mybatis.spring.annotation.MapperScan; |
|
5 |
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer; |
|
6 |
import org.springframework.context.annotation.Bean; |
|
7 |
import org.springframework.context.annotation.Configuration; |
|
8 |
import org.springframework.context.annotation.EnableAspectJAutoProxy; |
|
9 |
|
|
10 |
/** |
|
11 |
* 程序注解配置 |
|
12 |
* |
|
13 |
* @author jc |
|
14 |
*/ |
|
15 |
@Configuration |
|
16 |
// 表示通过aop框架暴露该代理对象,AopContext能够访问 |
|
17 |
@EnableAspectJAutoProxy(exposeProxy = true) |
|
18 |
// 指定要扫描的Mapper类的包的路径 |
|
19 |
@MapperScan("com.jcdm.**.mapper") |
|
20 |
public class ApplicationConfig |
|
21 |
{ |
|
22 |
/** |
|
23 |
* 时区配置 |
|
24 |
*/ |
|
25 |
@Bean |
|
26 |
public Jackson2ObjectMapperBuilderCustomizer jacksonObjectMapperCustomization() |
|
27 |
{ |
|
28 |
return jacksonObjectMapperBuilder -> jacksonObjectMapperBuilder.timeZone(TimeZone.getDefault()); |
|
29 |
} |
|
30 |
} |