zuihou: mysql: ip: ${MYSQL_IP:117.78.49.203} port: 3306 username: root password: LomdtE@ShiTong2021 database: zuihou_defaults_yj driverClassName: com.mysql.cj.jdbc.Driver url: jdbc:mysql://${zuihou.mysql.ip}:${zuihou.mysql.port}/${zuihou.mysql.database}?serverTimezone=CTT&characterEncoding=utf8&useUnicode=true&useSSL=false&autoReconnect=true&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true redis: ip: 127.0.0.1 port: 6379 database: 0 password: database: multiTenantType: SCHEMA tenantDatabasePrefix: imcs_base_331 isBlockAttack: false worker-id: 0 data-center-id: 0 ### xxl-job email xxl.job: mail: host: smtp.163.com port: 25 ssl: false username: ovono802302@163.com password: asdfzxcv sendNick: 《任务调度平台ZUIHOU-JOB》 login: username: zuihou password: zuihou # 调度中心国际化配置 : 默认为 "zh_CN"/中文简体, 可选范围为 "zh_CN"/中文简体, "zh_TC"/中文繁体 and "en"/英文; i18n: #设置一:调度中心和执行器,均不设置AccessToken;关闭安全性校验; #设置二:调度中心和执行器,设置了相同的AccessToken; accessToken: # 以下是client 执行器端配置(注意:若不想配置调度器也是执行器,请自行参考xxl) admin: addresses: http://127.0.0.1:${server.port}/${spring.application.name} executor: # 执行器名 appname: ${spring.application.name} # # 调度器通过XXL-RPC跟执行器通信的IP ip: ${EXECUTOR_IP:127.0.0.1} # 调度器通过XXL-RPC跟执行器通信的端口 port: ${EXECUTOR_PORT:8771} registryLazy: 10000 # 延迟10秒注册,防止首次启动报错 # 日志路径 logpath: ${logging.file.path}/${spring.application.name}/ # 日志保留天数 logretentiondays: -1 server: servlet: context-path: /${spring.application.name} port: 8767 undertow: # jetty undertow io-threads: 4 # 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程 worker-threads: 80 # 阻塞任务线程池, 当执行类似servlet请求阻塞操作, undertow会从这个线程池中取得线程,它的值设置取决于系统的负载 buffer-size: 1024 # 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理 , 每块buffer的空间大小,越小的空间被利用越充分 direct-buffers: true # 是否分配的直接内存 # mysql 通用配置 spring: profiles: active: dev datasource: # 从这里开始(dynamic),中间的这段配置用于 zuihou.database.multiTenantType == DATASOURCE 时 dynamic: enabled: false # 这里一定要写成false, 是否开启根据 zuihou.database.multiTenantType 来决定 p6spy: true druid: initialSize: 10 minIdle: 10 maxActive: 500 max-wait: 60000 pool-prepared-statements: true max-pool-prepared-statement-per-connection-size: 20 validation-query: SELECT 'x' test-on-borrow: false test-on-return: false test-while-idle: true time-between-eviction-runs-millis: 60000 #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 min-evictable-idle-time-millis: 300000 #配置一个连接在池中最小生存的时间,单位是毫秒 filters: stat,wall wall: comment-allow: true multiStatementAllow: true noneBaseStatementAllow: true datasource: master: username: ${zuihou.mysql.username} password: ${zuihou.mysql.password} driver-class-name: ${zuihou.mysql.driverClassName} url: jdbc:mysql://${zuihou.mysql.ip}:${zuihou.mysql.port}/${zuihou.mysql.database}?serverTimezone=CTT&characterEncoding=utf8&useUnicode=true&useSSL=false&autoReconnect=true&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true db-type: mysql # 从这里结束(dynamic),中间的这段配置用于 zuihou.database.multiTenantType == DATASOURCE 时 druid: enable: true # 从这里开始(druid),中间的这段配置用于 zuihou.database.multiTenantType != DATASOURCE 时 username: ${zuihou.mysql.username} password: ${zuihou.mysql.password} driver-class-name: ${zuihou.mysql.driverClassName} url: jdbc:mysql://${zuihou.mysql.ip}:${zuihou.mysql.port}/${zuihou.mysql.database}?serverTimezone=CTT&characterEncoding=utf8&useUnicode=true&useSSL=false&autoReconnect=true&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true db-type: mysql initialSize: 10 minIdle: 10 maxActive: 500 max-wait: 60000 pool-prepared-statements: true max-pool-prepared-statement-per-connection-size: 20 validation-query: SELECT 'x' test-on-borrow: false test-on-return: false test-while-idle: true time-between-eviction-runs-millis: 60000 #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 min-evictable-idle-time-millis: 300000 #配置一个连接在池中最小生存的时间,单位是毫秒 filters: stat,wall filter: wall: enabled: true config: commentAllow: true multiStatementAllow: true noneBaseStatementAllow: true # 从这里结束(druid),中间的这段配置用于 zuihou.database.multiTenantType != DATASOURCE 时 # 以下的2段配置,同时适用于所有模式 web-stat-filter: # WebStatFilter配置,说明请参考Druid Wiki,配置_配置WebStatFilter enabled: true url-pattern: /* exclusions: "*.js , *.gif ,*.jpg ,*.png ,*.css ,*.ico , /druid/*" session-stat-max-count: 1000 profile-enable: true session-stat-enable: false stat-view-servlet: #展示Druid的统计信息,StatViewServlet的用途包括:1.提供监控信息展示的html页面2.提供监控信息的JSON API enabled: true url-pattern: /druid/* #根据配置中的url-pattern来访问内置监控页面,如果是上面的配置,内置监控页面的首页是/druid/index.html例如:http://127.0.0.1:9000/druid/index.html reset-enable: true #允许清空统计数据 login-username: zuihou login-password: zuihou mvc: static-path-pattern: /static/** resources: static-locations: classpath:/static/ freemarker: templateLoaderPath: classpath:/templates/ suffix: .ftl charset: UTF-8 request-context-attribute: request settings: number_format: 0.## #解決freemarker数字输出中的逗号问题 # classic_compatible: true #默认情况变量为null则替换为空字符串,如果需要自定义,写上${empty!"EmptyValue of fbysss"}的形式即可 whitespace_stripping: true # 剥离前后空字符串 boolean_format: true,false # 布尔类型格式化 datetime_format: yyyy-MM-dd HH:mm:ss # dateTime 类型格式化, 使用日期类型时, 需要在参数后追加 ?datetime eg: ${date?datetime} date_format: yyyy-MM-dd # date 类型格式化, 使用日期类型时, 需要在参数后追加 ?date eg: ${date?date} time_format: HH:mm:ss # time 类型格式化, 使用日期类型时, 需要在参数后追加 ?time eg: ${date?time} template_exception_handler: ignore # 忽略模版异常 default_encoding: UTF-8 # 默认编码 url_escaping_charset: UTF-8 # url 转义编码 http: encoding: charset: UTF-8 force: true enabled: true cache: type: GENERIC redis: host: ${zuihou.redis.ip} password: ${zuihou.redis.password} port: ${zuihou.redis.port} database: ${zuihou.redis.database} #mybatis: # mapper-locations: classpath:mybatis-mapper/*.xml mybatis-plus: # 如果是放在src/main/java目录下 classpath:/com/yourpackage/*/mapper/*Mapper.xml # 如果是放在resource目录 classpath:/mapper/*Mapper.xml mapper-locations: - classpath:mybatis-mapper/**/*Mapper.xml - classpath*:mapper_**/**/*Mapper.xml #实体扫描,多个package用逗号或者分号分隔 typeAliasesPackage: com.xxl.job.admin.core.model;com.github.zuihou.*.entity;com.github.zuihou.database.mybatis.typehandler typeEnumsPackage: com.github.zuihou.*.enumeration global-config: db-config: id-type: ASSIGN_ID insert-strategy: NOT_NULL update-strategy: NOT_NULL select-strategy: NOT_EMPTY configuration: #配置返回数据库(column下划线命名&&返回java实体是驼峰命名),自动匹配无需as(没开启这个,SQL需要写as: select user_id as userId) map-underscore-to-camel-case: true cache-enabled: false #配置JdbcTypeForNull, oracle数据库必须配置 jdbc-type-for-null: 'null' j2cache: # config-location: /j2cache.properties open-spring-cache: true cache-clean-mode: passive allow-null-values: true redis-client: lettuce # l2-cache-open: true l2-cache-open: true # 关闭二级缓存 #broadcast: net.oschina.j2cache.cache.support.redis.SpringRedisPubSubPolicy broadcast: jgroups # 关闭二级缓存 L1: provider_class: caffeine L2: provider_class: net.oschina.j2cache.cache.support.redis.SpringRedisProvider config_section: lettuce sync_ttl_to_redis: true default_cache_null_object: false serialization: fst caffeine: properties: /j2cache/caffeine.properties # 这个配置文件需要放在项目中 lettuce: mode: single namespace: storage: generic channel: j2cache scheme: redis hosts: ${zuihou.redis.ip}:${zuihou.redis.port} password: ${zuihou.redis.password} database: 0 sentinelMasterId: maxTotal: 100 maxIdle: 10 minIdle: 10 timeout: 10000