From a6fb88d74c20cc28043d75e8a5097fce49cf9a78 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期五, 15 十月 2021 15:19:42 +0800 Subject: [PATCH] update [重大更新]全业务 增加 接口文档注解 格式化代码 --- ruoyi-admin/src/main/resources/application.yml | 249 ++++++++++++++++++++++++++++++++++--------------- 1 files changed, 173 insertions(+), 76 deletions(-) diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index 6ab3030..4d2da75 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -8,20 +8,19 @@ copyrightYear: 2021 # 瀹炰緥婕旂ず寮�鍏� demoEnabled: true - # 鏂囦欢璺緞,浣跨敤jvm绯荤粺鍙橀噺,鍏煎windows鍜宭inux; - profile: ${user.dir}/ruoyi/uploadPath # 鑾峰彇ip鍦板潃寮�鍏� - addressEnabled: false + addressEnabled: true captcha: + # 椤甸潰 <鍙傛暟璁剧疆> 鍙紑鍚叧闂� 楠岃瘉鐮佹牎楠� # 楠岃瘉鐮佺被鍨� math 鏁扮粍璁$畻 char 瀛楃楠岃瘉 - captchaType: math + type: MATH # line 绾挎骞叉壈 circle 鍦嗗湀骞叉壈 shear 鎵洸骞叉壈 - captchaCategory: circle + category: CIRCLE # 鏁板瓧楠岃瘉鐮佷綅鏁� - captchaNumberLength: 1 + numberLength: 1 # 瀛楃楠岃瘉鐮侀暱搴� - captchaCharLength: 4 + charLength: 4 # 寮�鍙戠幆澧冮厤缃� server: @@ -37,12 +36,13 @@ # 浠ヤ笅鐨勯厤缃細褰卞搷buffer,杩欎簺buffer浼氱敤浜庢湇鍔″櫒杩炴帴鐨処O鎿嶄綔,鏈夌偣绫讳技netty鐨勬睜鍖栧唴瀛樼鐞� # 姣忓潡buffer鐨勭┖闂村ぇ灏�,瓒婂皬鐨勭┖闂磋鍒╃敤瓒婂厖鍒� buffer-size: 512 - # 璁剧疆IO绾跨▼鏁�, 瀹冧富瑕佹墽琛岄潪闃诲鐨勪换鍔�,瀹冧滑浼氳礋璐e涓繛鎺�, 榛樿璁剧疆姣忎釜CPU鏍稿績涓�涓嚎绋� - io-threads: 8 - # 闃诲浠诲姟绾跨▼姹�, 褰撴墽琛岀被浼約ervlet璇锋眰闃诲鎿嶄綔, undertow浼氫粠杩欎釜绾跨▼姹犱腑鍙栧緱绾跨▼,瀹冪殑鍊艰缃彇鍐充簬绯荤粺鐨勮礋杞� - worker-threads: 256 # 鏄惁鍒嗛厤鐨勭洿鎺ュ唴瀛� direct-buffers: true + threads: + # 璁剧疆IO绾跨▼鏁�, 瀹冧富瑕佹墽琛岄潪闃诲鐨勪换鍔�,瀹冧滑浼氳礋璐e涓繛鎺�, 榛樿璁剧疆姣忎釜CPU鏍稿績涓�涓嚎绋� + io: 8 + # 闃诲浠诲姟绾跨▼姹�, 褰撴墽琛岀被浼約ervlet璇锋眰闃诲鎿嶄綔, undertow浼氫粠杩欎釜绾跨▼姹犱腑鍙栧緱绾跨▼,瀹冪殑鍊艰缃彇鍐充簬绯荤粺鐨勮礋杞� + worker: 256 # # tomcat 閰嶇疆 # tomcat: # # tomcat鐨刄RI缂栫爜 @@ -59,21 +59,27 @@ org.springframework: warn config: classpath:logback.xml +# tlog 鍏ㄥ眬璁块棶鎬ц兘鎷︽埅 +tlog: + enable-invoke-time-print: true + # Spring閰嶇疆 spring: + application: + name: ${ruoyi.name} # 璧勬簮淇℃伅 messages: # 鍥介檯鍖栬祫婧愭枃浠惰矾寰� basename: i18n/messages - profiles: + profiles: active: @profiles.active@ # 鏂囦欢涓婁紶 servlet: - multipart: - # 鍗曚釜鏂囦欢澶у皬 - max-file-size: 10MB - # 璁剧疆鎬讳笂浼犵殑鏂囦欢澶у皬 - max-request-size: 20MB + multipart: + # 鍗曚釜鏂囦欢澶у皬 + max-file-size: 10MB + # 璁剧疆鎬讳笂浼犵殑鏂囦欢澶у皬 + max-request-size: 20MB # 鏈嶅姟妯″潡 devtools: restart: @@ -83,46 +89,59 @@ thymeleaf: # 灏嗙郴缁熸ā鏉挎斁缃埌鏈�鍓嶉潰 鍚﹀垯浼氫笌 springboot-admin 椤甸潰鍐茬獊 template-resolver-order: 1 - application: - name: ruoyi-vue-plus - boot: - admin: - # Spring Boot Admin Client 瀹㈡埛绔殑鐩稿叧閰嶇疆 - client: - # 璁剧疆 Spring Boot Admin Server 鍦板潃 - url: http://localhost:${server.port}${spring.boot.admin.context-path} - instance: - prefer-ip: true # 娉ㄥ唽瀹炰緥鏃讹紝浼樺厛浣跨敤 IP -# username: ruoyi -# password: 123456 - # Spring Boot Admin Server 鏈嶅姟绔殑鐩稿叧閰嶇疆 - context-path: /admin # 閰嶇疆 Spring - -# Actuator 鐩戞帶绔偣鐨勯厤缃」 -management: - endpoints: - web: - # Actuator 鎻愪緵鐨� API 鎺ュ彛鐨勬牴鐩綍銆傞粯璁や负 /actuator - base-path: /actuator - exposure: - # 闇�瑕佸紑鏀剧殑绔偣銆傞粯璁ゅ�煎彧鎵撳紑 health 鍜� info 涓や釜绔偣銆傞�氳繃璁剧疆 * 锛屽彲浠ュ紑鏀炬墍鏈夌鐐广�� - include: '*' - endpoint: - logfile: - external-file: ./logs/sys-console.log + jackson: + # 鏃ユ湡鏍煎紡鍖� + date-format: yyyy-MM-dd HH:mm:ss + serialization: + # 鏍煎紡鍖栬緭鍑� + indent_output: false + # 蹇界暐鏃犳硶杞崲鐨勫璞� + fail_on_empty_beans: false + deserialization: + # 鍏佽瀵硅薄蹇界暐json涓笉瀛樺湪鐨勫睘鎬� + fail_on_unknown_properties: false # token閰嶇疆 token: - # 浠ょ墝鑷畾涔夋爣璇� - header: Authorization - # 浠ょ墝瀵嗛挜 - secret: abcdefghijklmnopqrstuvwxyz - # 浠ょ墝鏈夋晥鏈燂紙榛樿30鍒嗛挓锛� - expireTime: 30 - -# MyBatis閰嶇疆 + # 浠ょ墝鑷畾涔夋爣璇� + header: Authorization + # 浠ょ墝瀵嗛挜 + secret: abcdefghijklmnopqrstuvwxyz + # 浠ょ墝鏈夋晥鏈燂紙榛樿30鍒嗛挓锛� + expireTime: 30 + +# security閰嶇疆 +security: + # 鐧诲嚭璺緞 + logout-url: /logout + # 鍖垮悕璺緞 + anonymous: + - /login + - /register + - /captchaImage + # swagger 鏂囨。閰嶇疆 + - /doc.html + - /swagger-resources/** + - /webjars/** + - /*/api-docs + # druid 鐩戞帶閰嶇疆 + - /druid/** + # actuator 鐩戞帶閰嶇疆 + - /actuator + - /actuator/** + # 鐢ㄦ埛鏀捐 + permit-all: + +# 閲嶅鎻愪氦 +repeat-submit: + # 鍏ㄥ眬闂撮殧鏃堕棿(姣) + interval: 5000 + +# MyBatisPlus閰嶇疆 # https://baomidou.com/config/ mybatis-plus: + # 涓嶆敮鎸佸鍖�, 濡傛湁闇�瑕佸彲鍦ㄦ敞瑙i厤缃� 鎴� 鎻愬崌鎵寘绛夌骇 + # 渚嬪 com.**.**.mapper mapperPackage: com.ruoyi.**.mapper # 瀵瑰簲鐨� XML 鏂囦欢浣嶇疆 mapperLocations: classpath*:mapper/**/*Mapper.xml @@ -141,8 +160,6 @@ # REUSE锛氳鎵ц鍣ㄧ被鍨嬩細澶嶇敤棰勫鐞嗚鍙ワ紙PreparedStatement锛� # BATCH锛氳鎵ц鍣ㄧ被鍨嬩細鎵归噺鎵ц鎵�鏈夌殑鏇存柊璇彞 executorType: SIMPLE - # 鎸囧畾澶栭儴鍖� MyBatis Properties 閰嶇疆锛岄�氳繃璇ラ厤缃彲浠ユ娊绂婚厤缃紝瀹炵幇涓嶅悓鐜鐨勯厤缃儴缃� - configurationProperties: null configuration: # 鑷姩椹煎嘲鍛藉悕瑙勫垯锛坈amel case锛夋槧灏� # 濡傛灉鎮ㄧ殑鏁版嵁搴撳懡鍚嶇鍚堣鍒欐棤闇�浣跨敤 @TableField 娉ㄨВ鎸囧畾鏁版嵁搴撳瓧娈靛悕 @@ -169,7 +186,11 @@ # STATEMENT 鍏抽棴涓�绾х紦瀛� localCacheScope: SESSION # 寮�鍚疢ybatis浜岀骇缂撳瓨锛岄粯璁や负 true - cacheEnabled: true + cacheEnabled: false + # 鏇磋缁嗙殑鏃ュ織杈撳嚭 浼氭湁鎬ц兘鎹熻�� org.apache.ibatis.logging.stdout.StdOutImpl + # 鍏抽棴鏃ュ織璁板綍 (鍙崟绾娇鐢� p6spy 鍒嗘瀽) org.apache.ibatis.logging.nologging.NoLoggingImpl + # 榛樿鏃ュ織杈撳嚭 org.apache.ibatis.logging.slf4j.Slf4jImpl + logImpl: org.apache.ibatis.logging.nologging.NoLoggingImpl global-config: # 鏄惁鎵撳嵃 Logo banner banner: true @@ -203,18 +224,11 @@ # NOT_EMPTY 闈炵┖鍒ゆ柇(鍙瀛楃涓茬被鍨嬪瓧娈�,鍏朵粬绫诲瀷瀛楁渚濈劧涓洪潪NULL鍒ゆ柇) # DEFAULT 榛樿鐨�,涓�鑸彧鐢ㄤ簬娉ㄨВ閲� # NEVER 涓嶅姞鍏� SQL - insertStrategy: NOT_EMPTY + insertStrategy: NOT_NULL # 瀛楁楠岃瘉绛栫暐涔� update,鍦� update 鐨勬椂鍊欑殑瀛楁楠岃瘉绛栫暐 - updateStrategy: NOT_EMPTY + updateStrategy: NOT_NULL # 瀛楁楠岃瘉绛栫暐涔� select,鍦� select 鐨勬椂鍊欑殑瀛楁楠岃瘉绛栫暐鏃� wrapper 鏍规嵁鍐呴儴 entity 鐢熸垚鐨� where 鏉′欢 - selectStrategy: NOT_EMPTY - -# PageHelper鍒嗛〉鎻掍欢 -pagehelper: - helperDialect: mysql - reasonable: true - supportMethodsArguments: true - params: count=countSql + where-strategy: NOT_NULL # Swagger閰嶇疆 swagger: @@ -223,22 +237,35 @@ # 璇锋眰鍓嶇紑 pathMapping: /dev-api # 鏍囬 - title: '鏍囬锛歊uoYi-Vue-Plus鍚庡彴绠$悊绯荤粺_鎺ュ彛鏂囨。' + title: '鏍囬锛�${ruoyi.name}鍚庡彴绠$悊绯荤粺_鎺ュ彛鏂囨。' # 鎻忚堪 description: '鎻忚堪锛氱敤浜庣鐞嗛泦鍥㈡棗涓嬪叕鍙哥殑浜哄憳淇℃伅,鍏蜂綋鍖呮嫭XXX,XXX妯″潡...' # 鐗堟湰 version: '鐗堟湰鍙�: ${ruoyi-vue-plus.version}' + # 浣滆�呬俊鎭� + contact: + name: Lion Li + email: crazylionli@163.com + url: https://gitee.com/JavaLionLi/RuoYi-Vue-Plus + groups: + - name: 浠g爜鐢熸垚妯″潡 + basePackage: com.ruoyi.generator + - name: 婕旂ず妗堜緥 + basePackage: com.ruoyi.demo + - name: 绯荤粺妯″潡 + basePackage: com.ruoyi.web # 闃叉XSS鏀诲嚮 -xss: +xss: # 杩囨护寮�鍏� enabled: true # 鎺掗櫎閾炬帴锛堝涓敤閫楀彿鍒嗛殧锛� - excludes: /system/notice/* + excludes: /system/notice # 鍖归厤閾炬帴 urlPatterns: /system/*,/monitor/*,/tool/* -threadPoolConfig: +# 鍏ㄥ眬绾跨▼姹犵浉鍏抽厤缃� +thread-pool: # 鏄惁寮�鍚嚎绋嬫睜 enabled: false # 鏍稿績绾跨▼姹犲ぇ灏� @@ -250,13 +277,16 @@ # 绾跨▼姹犵淮鎶ょ嚎绋嬫墍鍏佽鐨勭┖闂叉椂闂� keepAliveSeconds: 300 # 绾跨▼姹犲鎷掔粷浠诲姟(鏃犵嚎绋嬪彲鐢�)鐨勫鐞嗙瓥鐣� - # CallerRunsPolicy 绛夊緟 - # DiscardOldestPolicy 鏀惧純鏈�鏃х殑 - # DiscardPolicy 涓㈠純 - # AbortPolicy 涓 - rejectedExecutionHandler: CallerRunsPolicy + # CALLER_RUNS_POLICY 璋冪敤鏂规墽琛� + # DISCARD_OLDEST_POLICY 鏀惧純鏈�鏃х殑 + # DISCARD_POLICY 涓㈠純 + # ABORT_POLICY 涓 + rejectedExecutionHandler: CALLER_RUNS_POLICY +# feign 鐩稿叧閰嶇疆 feign: + # 涓嶆敮鎸佸鍖�, 濡傛湁闇�瑕佸彲鍦ㄦ敞瑙i厤缃� 鎴� 鎻愬崌鎵寘绛夌骇 + # 渚嬪 com.**.**.feign package: com.ruoyi.**.feign # 寮�鍚帇缂� compression: @@ -266,5 +296,72 @@ enabled: true okhttp: enabled: true - hystrix: - enabled: true \ No newline at end of file + circuitbreaker: + enabled: true + +--- # redisson 缂撳瓨閰嶇疆 +redisson: + cacheGroup: + # 鐢ㄤ緥: @Cacheable(cacheNames="groupId", key="#XXX") 鏂瑰彲浣跨敤缂撳瓨缁勯厤缃� + - groupId: redissonCacheMap + # 缁勮繃鏈熸椂闂�(鑴氭湰鐩戞帶) + ttl: 60000 + # 缁勬渶澶х┖闂叉椂闂�(鑴氭湰鐩戞帶) + maxIdleTime: 60000 + # 缁勬渶澶ч暱搴� + maxSize: 0 + - groupId: testCache + ttl: 1000 + maxIdleTime: 500 + +--- # 鍒嗗竷寮忛攣 lock4j 鍏ㄥ眬閰嶇疆 +lock4j: + # 鑾峰彇鍒嗗竷寮忛攣瓒呮椂鏃堕棿锛岄粯璁や负 3000 姣 + acquire-timeout: 3000 + # 鍒嗗竷寮忛攣鐨勮秴鏃舵椂闂达紝榛樿涓� 30 姣 + expire: 30000 + +--- # Actuator 鐩戞帶绔偣鐨勯厤缃」 +management: + endpoints: + web: + # Actuator 鎻愪緵鐨� API 鎺ュ彛鐨勬牴鐩綍銆傞粯璁や负 /actuator + base-path: /actuator + exposure: + # 闇�瑕佸紑鏀剧殑绔偣銆傞粯璁ゅ�煎彧鎵撳紑 health 鍜� info 涓や釜绔偣銆傞�氳繃璁剧疆 * 锛屽彲浠ュ紑鏀炬墍鏈夌鐐广�� + # 鐢熶骇鐜涓嶅缓璁斁寮�鎵�鏈� 鏍规嵁椤圭洰闇�姹傛斁寮�鍗冲彲 + include: @endpoints.include@ + endpoint: + logfile: + external-file: ./logs/sys-console.log + +--- # 瀹氭椂浠诲姟閰嶇疆 +spring: + quartz: + scheduler-name: RuoyiScheduler + startup-delay: 1s + overwrite-existing-jobs: true + auto-startup: true + job-store-type: jdbc + properties: + org: + quartz: + # Scheduler 鐩稿叧閰嶇疆 + scheduler: + instanceName: RuoyiScheduler + instanceId: AUTO + # 绾跨▼姹犵浉鍏抽厤缃� + threadPool: + class: org.quartz.simpl.SimpleThreadPool + threadCount: 20 + threadPriority: 5 + # JobStore 闆嗙兢閰嶇疆 + jobStore: + class: org.quartz.impl.jdbcjobstore.JobStoreTX + isClustered: true + clusterCheckinInterval: 15000 + txIsolationLevelSerializable: true + misfireThreshold: 60000 + tablePrefix: QRTZ_ + # sqlserver 鍚敤 + # selectWithLockSQL: SELECT * FROM {0}LOCKS UPDLOCK WHERE LOCK_NAME = ? -- Gitblit v1.9.3