src/main/resources/application-dev.yml

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

server:
  port: 8080    #更改端口号
  servlet:
    context-path: /hr



spring:
  devtools:
    restart:
      enabled: true  #设置热部署
      additional-paths: resources/**,static/**,templates/**,public/**,src/main/java
      poll-interval: 2000ms   #避免热部署后访问页面404
      quiet-period: 1000ms    #避免热部署后访问页面404

  thymeleaf:
    cache: false    #关闭模板引擎的缓存


  datasource:   #配置数据库连接
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://localhost:3306/hr_pro?characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true
    username: root
    password: 123456
    type: com.alibaba.druid.pool.DruidDataSource    #指定连接池
    filters: stat,wall        #filters与username同级,否则监控不到sql
    druid:
      initialSize: 5
      minIdle: 5
      maxActive: 20
      maxWait: 60000
      timeBetweenEvictionRunsMillis: 60000
      minEvictableIdleTimeMillis: 300000
      validationQuery: SELECT1FROMDUAL
      testWhileIdle: true
      testOnBorrow: false
      testOnReturn: false
      stat-view-servlet:
        enabled: true
    #  filters: stat,wall

  mail:
    username: xxxxxxxxx@qq.com
    password: xxxxxxxxxx
    host: smtp.qq.com
    default-encoding: utf-8
    properties:
      from: xxxxxxxxx@qq.com
      mail:
        smtp:
          ssl:
            enable: true
          auth: true
          timeout: 25000
  jackson:
    time-zone: GMT+8




后面还有 17 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。