!245 数据源由 Druid 修改为 Hikari
* update 更新 dataSource 数据源, 由 druid 修改为 hikari, 更新相关配置 ;
| | |
| | | <java.version>1.8</java.version> |
| | | <maven-jar-plugin.version>3.2.2</maven-jar-plugin.version> |
| | | <spring-boot.mybatis>2.2.2</spring-boot.mybatis> |
| | | <druid.version>1.2.12</druid.version> |
| | | <springdoc.version>1.6.12</springdoc.version> |
| | | <poi.version>5.2.3</poi.version> |
| | | <easyexcel.version>3.1.1</easyexcel.version> |
| | |
| | | <version>${hutool.version}</version> |
| | | <type>pom</type> |
| | | <scope>import</scope> |
| | | </dependency> |
| | | |
| | | <!-- é¿éæ°æ®åºè¿æ¥æ± --> |
| | | <dependency> |
| | | <groupId>com.alibaba</groupId> |
| | | <artifactId>druid-spring-boot-starter</artifactId> |
| | | <version>${druid.version}</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | |
| | | --- # æ°æ®æºé
ç½® |
| | | spring: |
| | | datasource: |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | type: com.zaxxer.hikari.HikariDataSource |
| | | # å¨ææ°æ®æºææ¡£ https://www.kancloud.cn/tracy5546/dynamic-datasource/content |
| | | dynamic: |
| | | # æ§è½åææä»¶(ææ§è½æè ä¸å»ºè®®ç产ç¯å¢ä½¿ç¨) |
| | |
| | | url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true |
| | | username: root |
| | | password: root |
| | | type: ${spring.datasource.type} |
| | | # ä»åºæ°æ®æº |
| | | slave: |
| | | lazy: true |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | url: |
| | | url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true |
| | | username: |
| | | password: |
| | | type: ${spring.datasource.type} |
| | | # oracle: |
| | | # driverClassName: oracle.jdbc.OracleDriver |
| | | # url: jdbc:oracle:thin:@//localhost:1521/XE |
| | | # username: ROOT |
| | | # password: root |
| | | # druid: |
| | | # validationQuery: SELECT 1 FROM DUAL |
| | | # type: ${spring.datasource.type} |
| | | # hikari: |
| | | # connectionTestQuery: SELECT 1 FROM DUAL |
| | | # postgres: |
| | | # driverClassName: org.postgresql.Driver |
| | | # url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true |
| | | # username: root |
| | | # password: root |
| | | # type: ${spring.datasource.type} |
| | | # sqlserver: |
| | | # driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | # url: jdbc:sqlserver://localhost:1433;DatabaseName=tempdb;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true |
| | | # username: SA |
| | | # password: root |
| | | druid: |
| | | # åå§è¿æ¥æ° |
| | | initialSize: 5 |
| | | # æå°è¿æ¥æ± æ°é |
| | | minIdle: 10 |
| | | # æå¤§è¿æ¥æ± æ°é |
| | | maxActive: 20 |
| | | # type: ${spring.datasource.type} |
| | | hikari: |
| | | # é
ç½®è·åè¿æ¥çå¾
è¶
æ¶çæ¶é´ |
| | | maxWait: 60000 |
| | | # é
ç½®é´éå¤ä¹
æè¿è¡ä¸æ¬¡æ£æµï¼æ£æµéè¦å
³éç空é²è¿æ¥ï¼å使¯æ¯«ç§ |
| | | timeBetweenEvictionRunsMillis: 60000 |
| | | # é
ç½®ä¸ä¸ªè¿æ¥å¨æ± 䏿å°çåçæ¶é´ï¼å使¯æ¯«ç§ |
| | | minEvictableIdleTimeMillis: 300000 |
| | | # é
ç½®ä¸ä¸ªè¿æ¥å¨æ± 䏿大çåçæ¶é´ï¼å使¯æ¯«ç§ |
| | | maxEvictableIdleTimeMillis: 900000 |
| | | # é
ç½®æ£æµè¿æ¥æ¯å¦ææ |
| | | validationQuery: SELECT 1 |
| | | testWhileIdle: true |
| | | testOnBorrow: false |
| | | testOnReturn: false |
| | | # 注æè¿ä¸ªå¼ådruidåçä¸ä¸è´ï¼é»è®¤å¯å¨äºstat |
| | | filters: stat |
| | | |
| | | --- # druid é
ç½® |
| | | spring.datasource.druid: |
| | | webStatFilter: |
| | | enabled: true |
| | | statViewServlet: |
| | | enabled: true |
| | | # 设置ç½ååï¼ä¸å¡«åå
许ææè®¿é® |
| | | allow: |
| | | url-pattern: /druid/* |
| | | # æ§å¶å°ç®¡çç¨æ·ååå¯ç |
| | | login-username: ruoyi |
| | | login-password: 123456 |
| | | filter: |
| | | stat: |
| | | enabled: true |
| | | # æ
¢SQLè®°å½ |
| | | log-slow-sql: true |
| | | slow-sql-millis: 1000 |
| | | merge-sql: true |
| | | wall: |
| | | config: |
| | | multi-statement-allow: true |
| | | connection-timeout: 60000 |
| | | # 空é²è¿æ¥åæ´»æå¤§æ¶é´ï¼é»è®¤10åé |
| | | idle-timeout: 60000 |
| | | # æ¤å±æ§æ§å¶æ± ä¸è¿æ¥çæé¿çå½å¨æï¼å¼0表示æ éçå½å¨æï¼é»è®¤30åé |
| | | max-lifetime: 900000 |
| | | # æå¤§è¿æ¥æ± æ°éï¼é»è®¤æ¯10 |
| | | max-pool-size: 20 |
| | | # æå°è¿æ¥æ± æ°é |
| | | min-idle: 10 |
| | | # è¿æ¥æµè¯queryï¼é
ç½®æ£æµè¿æ¥æ¯å¦ææï¼ |
| | | connectionTestQuery: SELECT 1 |
| | | # æ¤å±æ§æ§å¶ä»æ± è¿åçè¿æ¥çé»è®¤èªå¨æäº¤è¡ä¸ºï¼é»è®¤å¼ï¼true |
| | | isAutoCommit: true |
| | | |
| | | --- # redis åæºé
ç½®(åæºä¸é群åªè½å¼å¯ä¸ä¸ªå¦ä¸ä¸ªéè¦æ³¨éæ) |
| | | spring: |
| | |
| | | --- # æ°æ®æºé
ç½® |
| | | spring: |
| | | datasource: |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | type: com.zaxxer.hikari.HikariDataSource |
| | | # å¨ææ°æ®æºææ¡£ https://www.kancloud.cn/tracy5546/dynamic-datasource/content |
| | | dynamic: |
| | | # æ§è½åææä»¶(ææ§è½æè ä¸å»ºè®®ç产ç¯å¢ä½¿ç¨) |
| | |
| | | url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true |
| | | username: root |
| | | password: root |
| | | type: ${spring.datasource.type} |
| | | # ä»åºæ°æ®æº |
| | | slave: |
| | | lazy: true |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | url: |
| | | url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true |
| | | username: |
| | | password: |
| | | type: ${spring.datasource.type} |
| | | # oracle: |
| | | # driverClassName: oracle.jdbc.OracleDriver |
| | | # url: jdbc:oracle:thin:@//localhost:1521/XE |
| | | # username: ROOT |
| | | # password: root |
| | | # druid: |
| | | # validationQuery: SELECT 1 FROM DUAL |
| | | # type: ${spring.datasource.type} |
| | | # hikari: |
| | | # connectionTestQuery: SELECT 1 FROM DUAL |
| | | # postgres: |
| | | # driverClassName: org.postgresql.Driver |
| | | # url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true |
| | | # username: root |
| | | # password: root |
| | | # type: ${spring.datasource.type} |
| | | # sqlserver: |
| | | # driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | # url: jdbc:sqlserver://localhost:1433;DatabaseName=tempdb;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true |
| | | # username: SA |
| | | # password: root |
| | | druid: |
| | | # åå§è¿æ¥æ° |
| | | initialSize: 5 |
| | | # æå°è¿æ¥æ± æ°é |
| | | minIdle: 10 |
| | | # æå¤§è¿æ¥æ± æ°é |
| | | maxActive: 20 |
| | | # type: ${spring.datasource.type} |
| | | hikari: |
| | | # é
ç½®è·åè¿æ¥çå¾
è¶
æ¶çæ¶é´ |
| | | maxWait: 60000 |
| | | # é
ç½®é´éå¤ä¹
æè¿è¡ä¸æ¬¡æ£æµï¼æ£æµéè¦å
³éç空é²è¿æ¥ï¼å使¯æ¯«ç§ |
| | | timeBetweenEvictionRunsMillis: 60000 |
| | | # é
ç½®ä¸ä¸ªè¿æ¥å¨æ± 䏿å°çåçæ¶é´ï¼å使¯æ¯«ç§ |
| | | minEvictableIdleTimeMillis: 300000 |
| | | # é
ç½®ä¸ä¸ªè¿æ¥å¨æ± 䏿大çåçæ¶é´ï¼å使¯æ¯«ç§ |
| | | maxEvictableIdleTimeMillis: 900000 |
| | | # é
ç½®æ£æµè¿æ¥æ¯å¦ææ |
| | | validationQuery: SELECT 1 |
| | | testWhileIdle: true |
| | | testOnBorrow: false |
| | | testOnReturn: false |
| | | # 注æè¿ä¸ªå¼ådruidåçä¸ä¸è´ï¼é»è®¤å¯å¨äºstat |
| | | filters: stat |
| | | |
| | | --- # druid é
ç½® |
| | | spring.datasource.druid: |
| | | webStatFilter: |
| | | enabled: true |
| | | statViewServlet: |
| | | enabled: true |
| | | # 设置ç½ååï¼ä¸å¡«åå
许ææè®¿é® |
| | | allow: |
| | | url-pattern: /druid/* |
| | | # æ§å¶å°ç®¡çç¨æ·ååå¯ç |
| | | login-username: ruoyi |
| | | login-password: 123456 |
| | | filter: |
| | | stat: |
| | | enabled: true |
| | | # æ
¢SQLè®°å½ |
| | | log-slow-sql: true |
| | | slow-sql-millis: 1000 |
| | | merge-sql: true |
| | | wall: |
| | | config: |
| | | multi-statement-allow: true |
| | | connection-timeout: 60000 |
| | | # 空é²è¿æ¥åæ´»æå¤§æ¶é´ï¼é»è®¤10åé |
| | | idle-timeout: 60000 |
| | | # æ¤å±æ§æ§å¶æ± ä¸è¿æ¥çæé¿çå½å¨æï¼å¼0表示æ éçå½å¨æï¼é»è®¤30åé |
| | | max-lifetime: 900000 |
| | | # æå¤§è¿æ¥æ± æ°éï¼é»è®¤æ¯10 |
| | | max-pool-size: 20 |
| | | # æå°è¿æ¥æ± æ°é |
| | | min-idle: 10 |
| | | # è¿æ¥æµè¯queryï¼é
ç½®æ£æµè¿æ¥æ¯å¦ææï¼ |
| | | connectionTestQuery: SELECT 1 |
| | | # æ¤å±æ§æ§å¶ä»æ± è¿åçè¿æ¥çé»è®¤èªå¨æäº¤è¡ä¸ºï¼é»è®¤å¼ï¼true |
| | | isAutoCommit: true |
| | | |
| | | --- # redis åæºé
ç½®(åæºä¸é群åªè½å¼å¯ä¸ä¸ªå¦ä¸ä¸ªéè¦æ³¨éæ) |
| | | spring: |
| | |
| | | <artifactId>spring-boot-starter-aop</artifactId> |
| | | </dependency> |
| | | |
| | | <!-- é¿éæ°æ®åºè¿æ¥æ± --> |
| | | <dependency> |
| | | <groupId>com.alibaba</groupId> |
| | | <artifactId>druid-spring-boot-starter</artifactId> |
| | | </dependency> |
| | | |
| | | <!-- sqlæ§è½åææä»¶ --> |
| | | <dependency> |
| | | <groupId>p6spy</groupId> |
| | |
| | | insert into sys_menu values('107', 'éç¥å
¬å', '1', '8', 'notice', 'system/notice/index', '', 1, 0, 'C', '0', '0', 'system:notice:list', 'message', 'admin', sysdate, '', null, 'éç¥å
¬åèå'); |
| | | insert into sys_menu values('108', 'æ¥å¿ç®¡ç', '1', '9', 'log', '', '', 1, 0, 'M', '0', '0', '', 'log', 'admin', sysdate, '', null, 'æ¥å¿ç®¡çèå'); |
| | | insert into sys_menu values('109', 'å¨çº¿ç¨æ·', '2', '1', 'online', 'monitor/online/index', '', 1, 0, 'C', '0', '0', 'monitor:online:list', 'online', 'admin', sysdate, '', null, 'å¨çº¿ç¨æ·èå'); |
| | | insert into sys_menu values('111', 'æ°æ®çæ§', '2', '3', 'druid', 'monitor/druid/index', '', 1, 0, 'C', '0', '0', 'monitor:druid:list', 'druid', 'admin', sysdate, '', null, 'æ°æ®çæ§èå'); |
| | | insert into sys_menu values('112', 'ç¼åå表', '2', '6', 'cacheList', 'monitor/cache/list', '', 1, 0, 'C', '0', '0', 'monitor:cache:list', 'redis-list', 'admin', sysdate, '', null, 'ç¼åå表èå'); |
| | | insert into sys_menu values('113', 'ç¼åçæ§', '2', '5', 'cache', 'monitor/cache/index', '', 1, 0, 'C', '0', '0', 'monitor:cache:list', 'redis', 'admin', sysdate, '', null, 'ç¼åçæ§èå'); |
| | | insert into sys_menu values('114', '表åæå»º', '3', '1', 'build', 'tool/build/index', '', 1, 0, 'C', '0', '0', 'tool:build:list', 'build', 'admin', sysdate, '', null, '表åæå»ºèå'); |
| | |
| | | insert into sys_menu values('107', 'éç¥å
¬å', '1', '8', 'notice', 'system/notice/index', '', '1', '0', 'C', '0', '0', 'system:notice:list', 'message', 'admin', now(), '', null, 'éç¥å
¬åèå'); |
| | | insert into sys_menu values('108', 'æ¥å¿ç®¡ç', '1', '9', 'log', '', '', '1', '0', 'M', '0', '0', '', 'log', 'admin', now(), '', null, 'æ¥å¿ç®¡çèå'); |
| | | insert into sys_menu values('109', 'å¨çº¿ç¨æ·', '2', '1', 'online', 'monitor/online/index', '', '1', '0', 'C', '0', '0', 'monitor:online:list', 'online', 'admin', now(), '', null, 'å¨çº¿ç¨æ·èå'); |
| | | insert into sys_menu values('111', 'æ°æ®çæ§', '2', '3', 'druid', 'monitor/druid/index', '', '1', '0', 'C', '0', '0', 'monitor:druid:list', 'druid', 'admin', now(), '', null, 'æ°æ®çæ§èå'); |
| | | insert into sys_menu values('112', 'ç¼åå表', '2', '6', 'cacheList', 'monitor/cache/list', '', '1', '0', 'C', '0', '0', 'monitor:cache:list', 'redis-list', 'admin', now(), '', null, 'ç¼åå表èå'); |
| | | insert into sys_menu values('113', 'ç¼åçæ§', '2', '5', 'cache', 'monitor/cache/index', '', '1', '0', 'C', '0', '0', 'monitor:cache:list', 'redis', 'admin', now(), '', null, 'ç¼åçæ§èå'); |
| | | insert into sys_menu values('114', '表åæå»º', '3', '1', 'build', 'tool/build/index', '', '1', '0', 'C', '0', '0', 'tool:build:list', 'build', 'admin', now(), '', null, '表åæå»ºèå'); |
| | |
| | | insert into sys_menu values('107', 'éç¥å
¬å', '1', '8', 'notice', 'system/notice/index', '', 1, 0, 'C', '0', '0', 'system:notice:list', 'message', 'admin', sysdate(), '', null, 'éç¥å
¬åèå'); |
| | | insert into sys_menu values('108', 'æ¥å¿ç®¡ç', '1', '9', 'log', '', '', 1, 0, 'M', '0', '0', '', 'log', 'admin', sysdate(), '', null, 'æ¥å¿ç®¡çèå'); |
| | | insert into sys_menu values('109', 'å¨çº¿ç¨æ·', '2', '1', 'online', 'monitor/online/index', '', 1, 0, 'C', '0', '0', 'monitor:online:list', 'online', 'admin', sysdate(), '', null, 'å¨çº¿ç¨æ·èå'); |
| | | insert into sys_menu values('111', 'æ°æ®çæ§', '2', '3', 'druid', 'monitor/druid/index', '', 1, 0, 'C', '0', '0', 'monitor:druid:list', 'druid', 'admin', sysdate(), '', null, 'æ°æ®çæ§èå'); |
| | | insert into sys_menu values('112', 'ç¼åå表', '2', '6', 'cacheList', 'monitor/cache/list', '', 1, 0, 'C', '0', '0', 'monitor:cache:list', 'redis-list', 'admin', sysdate(), '', null, 'ç¼åå表èå'); |
| | | insert into sys_menu values('113', 'ç¼åçæ§', '2', '5', 'cache', 'monitor/cache/index', '', 1, 0, 'C', '0', '0', 'monitor:cache:list', 'redis', 'admin', sysdate(), '', null, 'ç¼åçæ§èå'); |
| | | insert into sys_menu values('114', '表åæå»º', '3', '1', 'build', 'tool/build/index', '', 1, 0, 'C', '0', '0', 'tool:build:list', 'build', 'admin', sysdate(), '', null, '表åæå»ºèå'); |
| | |
| | | GO |
| | | INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (109, N'å¨çº¿ç¨æ·', 2, 1, N'online', N'monitor/online/index', N'', 1, 0, N'C', N'0', N'0', N'monitor:online:list', N'online', N'admin', getdate(), N'', NULL, N'å¨çº¿ç¨æ·èå') |
| | | GO |
| | | INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (111, N'æ°æ®çæ§', 2, 3, N'druid', N'monitor/druid/index', N'', 1, 0, N'C', N'0', N'0', N'monitor:druid:list', N'druid', N'admin', getdate(), N'', NULL, N'æ°æ®çæ§èå') |
| | | GO |
| | | INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (112, N'ç¼åå表', 2, 6, N'cacheList', N'monitor/cache/list', N'', 1, 0, N'C', N'0', N'0', N'monitor:cache:list', N'redis-list', N'admin', getdate(), N'', NULL, N'ç¼åå表èå') |
| | | GO |
| | | INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (113, N'ç¼åçæ§', 2, 5, N'cache', N'monitor/cache/index', N'', 1, 0, N'C', N'0', N'0', N'monitor:cache:list', N'redis', N'admin', getdate(), N'', NULL, N'ç¼åçæ§èå') |