diff --git a/service/src/main/java/cn/bunny/services/service/impl/EmailTemplateServiceImpl.java b/service/src/main/java/cn/bunny/services/service/impl/EmailTemplateServiceImpl.java index 65b9b66..dafeadb 100644 --- a/service/src/main/java/cn/bunny/services/service/impl/EmailTemplateServiceImpl.java +++ b/service/src/main/java/cn/bunny/services/service/impl/EmailTemplateServiceImpl.java @@ -117,8 +117,8 @@ public class EmailTemplateServiceImpl extends ServiceImpl> getEmailTypes() { return Arrays.stream(EmailTemplateTypes.values()).map(emailTemplateTypes -> { Map map = new HashMap<>(); - map.put("key", emailTemplateTypes.getType()); - map.put("value", emailTemplateTypes.getSummary()); + map.put("key", emailTemplateTypes.getSummary()); + map.put("value", emailTemplateTypes.getType()); return map; }).toList(); } diff --git a/service/src/main/resources/application-dev.yml b/service/src/main/resources/application-dev.yml index c890f7a..070e765 100644 --- a/service/src/main/resources/application-dev.yml +++ b/service/src/main/resources/application-dev.yml @@ -1,22 +1,25 @@ -bunny: - datasource1: - host: 192.168.3.98 - port: 3304 - sqlData: auth_admin - username: root - password: "02120212" +server: + port: 7070 - redis: - host: 192.168.3.98 - port: 6379 - database: 0 - password: "123456" +logging: + level: + cn.bunny.service.mapper: info + cn.bunny.service.controller: info + cn.bunny.service.service: info + root: info + pattern: + dateformat: HH:mm:ss:SSS + file: + path: "logs/${spring.application.name}" - minio: - endpointUrl: "http://192.168.3.98:9000" - accessKey: bunny - secretKey: "02120212" - bucket-name: auth-admin + +mybatis-plus: + mapper-locations: classpath:mapper/*.xml + global-config: + db-config: + logic-delete-field: isDeleted + configuration: + log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 查看日志 # rabbitmq: # host: ${bunny.rabbitmq.host} @@ -35,4 +38,24 @@ bunny: # enabled: true # 失败重试 # initial-interval: 1000ms # 失败后初始时间 # multiplier: 1 # 失败后下次等待时长倍数 initial-interval * multiplier -# max-attempts: 3 # 最大重试次数 \ No newline at end of file +# max-attempts: 3 # 最大重试次数 + +bunny: + datasource1: + host: 192.168.3.98 + port: 3304 + sqlData: auth_admin + username: root + password: "02120212" + + redis: + host: 192.168.3.98 + port: 6379 + database: 0 + password: "123456" + + minio: + endpointUrl: "http://192.168.3.98:9000" + accessKey: bunny + secretKey: "02120212" + bucket-name: auth-admin \ No newline at end of file diff --git a/service/src/main/resources/application-prod.yml b/service/src/main/resources/application-prod.yml index 07b83e5..4572005 100644 --- a/service/src/main/resources/application-prod.yml +++ b/service/src/main/resources/application-prod.yml @@ -1,3 +1,28 @@ +server: + port: 7070 + +mybatis-plus: + mapper-locations: classpath:mapper/*.xml + global-config: + db-config: + logic-delete-field: isDeleted + +logging: + level: + cn.bunny.service.mapper: warn + cn.bunny.service.controller: warn + cn.bunny.service.service: warn + root: warn + pattern: + dateformat: HH:mm:ss:SSS + file: + path: "logs/${spring.application.name}" + +# 线上禁用文档 +knife4j: + enable: true + production: true + bunny: datasource1: host: 192.168.3.98 @@ -16,4 +41,4 @@ bunny: endpointUrl: "http://192.168.3.98:9000" accessKey: bunny secretKey: "02120212" - bucket-name: auth-admin + bucket-name: auth-admin \ No newline at end of file diff --git a/service/src/main/resources/application.yml b/service/src/main/resources/application.yml index 2920804..6ad6922 100644 --- a/service/src/main/resources/application.yml +++ b/service/src/main/resources/application.yml @@ -1,23 +1,3 @@ -server: - port: 7070 - -management: - endpoints: - web: - exposure: - include: "*" - base-path: /admin - info: - env: - enabled: true - java: - enabled: true - os: - enabled: true - endpoint: - health: - show-details: always - spring: profiles: active: @profiles.active@ @@ -60,40 +40,53 @@ spring: max-idle: 5 #最大空闲 min-idle: 0 #最小空闲 + quartz: + job-store-type: jdbc + jdbc: + initialize-schema: always + auto-startup: true + wait-for-jobs-to-complete-on-shutdown: true + overwrite-existing-jobs: false + scheduler-name: quartzScheduler + properties: + org: + quartz: + scheduler: + # 默认 + instanceName: RedpigScheduler + # 如果使用集群,instanceId必须唯一,设置成AUTO + instanceId: AUTO + jobStore: + # 存储方式使用JobStoreTX 也就是数据库 + class: org.springframework.scheduling.quartz.LocalDataSourceJobStore + driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate + # 表名前缀 + tablePrefix: QRTZ_ + useProperties: false + misfireThreshold: 5000 + threadPool: + class: org.quartz.simpl.SimpleThreadPool + threadCount: 20 + threadPriority: 5 + threadsInheritContextClassLoaderOfInitializingThread: true + jackson: date-format: yyyy-MM-dd HH:mm:ss time-zone: GMT+8 - quartz: - job-store-type: jdbc - jdbc: - initialize-schema: embedded - auto-startup: true - wait-for-jobs-to-complete-on-shutdown: true - overwrite-existing-jobs: false - -mybatis-plus: - mapper-locations: classpath:mapper/*.xml - global-config: - db-config: - logic-delete-field: isDelete -# configuration: -# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 查看日志 - -logging: - level: - cn.bunny.service.mapper: info - cn.bunny.service.controller: info - cn.bunny.service.service: info - root: info - pattern: - dateformat: HH:mm:ss:SSS - file: - path: "logs/${spring.application.name}" - -bunny: - minio: - endpointUrl: ${bunny.minio.endpointUrl} - accessKey: ${bunny.minio.accessKey} - secretKey: ${bunny.minio.secretKey} - bucket-name: ${bunny.minio.bucket-name} +management: + endpoints: + web: + exposure: + include: "*" + base-path: /admin + info: + env: + enabled: true + java: + enabled: true + os: + enabled: true + endpoint: + health: + show-details: always \ No newline at end of file diff --git a/service/src/main/resources/quartz.properties b/service/src/main/resources/quartz.properties deleted file mode 100644 index 704442e..0000000 --- a/service/src/main/resources/quartz.properties +++ /dev/null @@ -1,11 +0,0 @@ -org.quartz.scheduler.instanceName=quartzScheduler -org.quartz.threadPool.threadCount=5 -org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreTX -org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.StdJDBCDelegate -org.quartz.jobStore.tablePrefix=QRTZ_ -org.quartz.jobStore.dataSource=auth_admin -org.quartz.dataSource.auth_admin.driver=com.mysql.cj.jdbc.Driver -org.quartz.dataSource.auth_admin.URL=jdbc:mysql://192.168.3.98:3304/auth_admin?serverTimezone=GMT%2B8&useSSL=false&characterEncoding=utf-8&allowPublicKeyRetrieval=true -org.quartz.dataSource.auth_admin.user=root -org.quartz.dataSource.auth_admin.password=02120212 -org.quartz.dataSource.auth_admin.maxConnections=5 \ No newline at end of file