1.Server
1.1 配置端口号
- server:
-   port: 8888
1.2 配置项目前缀
- server:
-   context-path: goods
1.3 配置漏洞扫描问题
- server:
-   session:
-     cookie:
-       http-only: true
2.Spring
2.1 配置全局时间
- spring: 
-   jackson:
-     time-zone: Asia/Shanghai                        # 设置时区(默认会使用UTC时间)
-     date-format: yyyy-MM-dd HH:mm:ss        # 设置时间默认格式
2.2 设置应用的名称
- spring:
-   application:
-     name: mall-product        # 可用于服务注册发现等功能
2.4 配置数据源
- spring:
-   datasource:
-     driver-class-name: com.mysql.cj.jdbc.Driver
-     url: jdbc:mysql://124.223.64.141:3306/gulimall_pms?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
-     username: root
-     password: root
3.Mybatis
4.Mybatis-Plus
- mybatis-plus:
-   global-config:
-     db-config:
-       # 全局设置主键自增,这样就不用在每一个@TableId注解上标注了
-       id-type: auto
-       logic-delete-value: 0   # 逻辑已删除值(默认为 0)
-       logic-not-delete-value: 1   # 逻辑未删除值(默认为 1)
-   # 告诉 Mybatis Plus SQL 文件的映射位置
-   # 这里的 classpath 表示当前类路径下
-   # classpath* 表示所有项目路径下
-   mapper-locations: classpath:/mapper/**/*.xml
5.日志:logging
- logging:
-   path: /home/uniarch/logs    # 配置文件输出目录
-   file: uniarch.log                    # 配置日志输出文件名
-   level:
-     com.lbj: debug                    # 配置包名下的所有日志为debug级别,可以看到SQL
6.Web