mirror of
https://github.com/yangzongzhuan/RuoYi.git
synced 2025-12-20 09:17:10 +00:00
Compare commits
109 Commits
springboot
...
v4.8.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b16d50390e | ||
|
|
6e3a3f7864 | ||
|
|
7f32e481aa | ||
|
|
9dbf6a5152 | ||
|
|
ebd91619a4 | ||
|
|
bfbaca1e30 | ||
|
|
e16e2be36d | ||
|
|
e73d4918d3 | ||
|
|
075d603ed0 | ||
|
|
226b2e54c0 | ||
|
|
ccf62d2893 | ||
|
|
c4760e0a78 | ||
|
|
43fa384418 | ||
|
|
92df588297 | ||
|
|
8601a91e34 | ||
|
|
4d8d04d58e | ||
|
|
27f2082a64 | ||
|
|
ae1ab1037d | ||
|
|
32bcd170cd | ||
|
|
7420a4a39d | ||
|
|
b5ec0bd9ba | ||
|
|
0f1fe06195 | ||
|
|
477f439b7f | ||
|
|
609f9236fb | ||
|
|
a9bef0a1bc | ||
|
|
70194aee09 | ||
|
|
323d74fd2e | ||
|
|
029d4e3233 | ||
|
|
9e264a9692 | ||
|
|
434ab81e22 | ||
|
|
bcbb4ac994 | ||
|
|
4c74687ca2 | ||
|
|
9f48d2bbe8 | ||
|
|
227d522ead | ||
|
|
41330be9a2 | ||
|
|
a61a87b88f | ||
|
|
93f9e0048c | ||
|
|
723d8d50cb | ||
|
|
6f9f1ed9b2 | ||
|
|
baeba9a3bd | ||
|
|
2b8d00b756 | ||
|
|
b03b9736f5 | ||
|
|
ed0a289613 | ||
|
|
ec0d4157a7 | ||
|
|
33a1f1e373 | ||
|
|
4bbeb34a0f | ||
|
|
a0b314f2b5 | ||
|
|
a6fbf983e6 | ||
|
|
7afa3c9bc3 | ||
|
|
79daab1614 | ||
|
|
e511d4ed27 | ||
|
|
ea4af7a8cf | ||
|
|
f935b2782f | ||
|
|
4b9e52e1ae | ||
|
|
ea9976575a | ||
|
|
407f9f46d8 | ||
|
|
b1a4884c89 | ||
|
|
45d8fe0c16 | ||
|
|
63800dcbd1 | ||
|
|
7a787b5830 | ||
|
|
30f31c63ff | ||
|
|
6c3e3af074 | ||
|
|
21cd7b452a | ||
|
|
53e20d414b | ||
|
|
9f1089ff71 | ||
|
|
5bbddedc80 | ||
|
|
2537abd095 | ||
|
|
568787a12a | ||
|
|
a3b8727b94 | ||
|
|
d98e2adb37 | ||
|
|
e9e0718895 | ||
|
|
adf61988fe | ||
|
|
7c1cdcd73f | ||
|
|
e011eaea48 | ||
|
|
120d549170 | ||
|
|
ddd858ca73 | ||
|
|
0cdb4c7b9c | ||
|
|
9c9bbc8e2c | ||
|
|
4aac0058ea | ||
|
|
6bc1a6aeb1 | ||
|
|
9a833095cf | ||
|
|
a47b6e350e | ||
|
|
e0aad97d59 | ||
|
|
1aa973d300 | ||
|
|
39ebc000f0 | ||
|
|
50a53dfc97 | ||
|
|
54ba9b8c02 | ||
|
|
e728c37b64 | ||
|
|
0eaeba0298 | ||
|
|
7b6ed52181 | ||
|
|
72868aeb6f | ||
|
|
c0afd904d0 | ||
|
|
cac84c1bab | ||
|
|
fb4f63c883 | ||
|
|
66ebd480e1 | ||
|
|
758dd95c07 | ||
|
|
c0ce3fd7c2 | ||
|
|
9b68013b2a | ||
|
|
c34d9f0c09 | ||
|
|
3b968d735f | ||
|
|
b2a491c99a | ||
|
|
13fffa0ba8 | ||
|
|
d9fbae538b | ||
|
|
adb22846a4 | ||
|
|
5bef005075 | ||
|
|
ad5cd1921e | ||
|
|
c6c8f8b3fb | ||
|
|
e9550ab5bd | ||
|
|
447542656a |
@@ -98,4 +98,4 @@
|
|||||||
|
|
||||||
## 若依交流群
|
## 若依交流群
|
||||||
|
|
||||||
QQ群: [](https://jq.qq.com/?_wv=1027&k=5HBAaYN) [](https://jq.qq.com/?_wv=1027&k=5cHeRVW) [](https://jq.qq.com/?_wv=1027&k=53R0L5Z) [](https://jq.qq.com/?_wv=1027&k=5g75dCU) [](https://jq.qq.com/?_wv=1027&k=58cPoHA) [](https://jq.qq.com/?_wv=1027&k=5Ofd4Pb) [](https://jq.qq.com/?_wv=1027&k=5yugASz) [](https://jq.qq.com/?_wv=1027&k=5Rf3d2P) [](https://jq.qq.com/?_wv=1027&k=5ZIjaeP) [](https://jq.qq.com/?_wv=1027&k=5CJw1jY) [](https://jq.qq.com/?_wv=1027&k=5omzbKc) [](https://jq.qq.com/?_wv=1027&k=qPIKBb7s) [](https://jq.qq.com/?_wv=1027&k=4NsjKbtU) [](https://jq.qq.com/?_wv=1027&k=VD2pkz2G) [](https://jq.qq.com/?_wv=1027&k=HlshFwkJ) [](https://jq.qq.com/?_wv=1027&k=0ARRrO9V) [](https://jq.qq.com/?_wv=1027&k=up9k3ZXJ) [](https://jq.qq.com/?_wv=1027&k=540WfdEr) [](https://jq.qq.com/?_wv=1027&k=ss91fC4t) [](https://jq.qq.com/?_wv=1027&k=Cqd66IKe) [](https://jq.qq.com/?_wv=1027&k=7FplYUnR) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=lqMHu_5Fskm7H2S1vNAQTtzAUokVydwc&authKey=ptw0Fpch5pbNocML3CIJKKqZBaq2DI7cusKuzIgfMNiY3t9Pvd9hP%2BA8WYx3yaY1&noverify=0&group_code=174942938) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=blYlRDmwZXSXI5pVrPPU7ZJ1stFJ6Q2Q&authKey=ForGBWffHVlPt9NE3d7g4DoOIouBh%2BqvAj2lp1CLReHfZAUaK7SRrdwsChKpRJDJ&noverify=0&group_code=287843737) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=KTVAIhggR3rR3uZWK9A8kR4yYNREQ4jo&authKey=An4DUV9e7uK8I8VgBbp949z0ypQoDrOoqvVg%2FWOr2vuNNDMZUAMPvqHor6TFMIgz&noverify=0&group_code=232896766) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=XwhV8deuZXt__yteR1clNanVSXzA-ugq&authKey=ezgwKqEZPdP%2FgC9I03OBkJb%2Biii8yvVfwrcQuu0%2FL6ILXcRdHYDBFKCXeoeBT0E6&noverify=0&group_code=180208928) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=WqsGDxpGkqOPeWGOf3I32f_rXxdhqYNr&authKey=kvdF5df7PO9bzWxmixKhZN6ShsECBiuGUmmzTZBWVr2MVOfJ8%2F4oD0Gws0rbgYfz&noverify=0&group_code=140284548) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=z9z9jkkkinfAElKZk2FXqlN4XIXlXsMi&authKey=Sm9XMTV%2FFyANBrv9rVpMfMNcX4v1lVah3795O9VclQwU4DNzQcT5BLXTmTBouIkM&noverify=0&group_code=177203794)
|
QQ群: [](https://jq.qq.com/?_wv=1027&k=5HBAaYN) [](https://jq.qq.com/?_wv=1027&k=5cHeRVW) [](https://jq.qq.com/?_wv=1027&k=53R0L5Z) [](https://jq.qq.com/?_wv=1027&k=5g75dCU) [](https://jq.qq.com/?_wv=1027&k=58cPoHA) [](https://jq.qq.com/?_wv=1027&k=5Ofd4Pb) [](https://jq.qq.com/?_wv=1027&k=5yugASz) [](https://jq.qq.com/?_wv=1027&k=5Rf3d2P) [](https://jq.qq.com/?_wv=1027&k=5ZIjaeP) [](https://jq.qq.com/?_wv=1027&k=5CJw1jY) [](https://jq.qq.com/?_wv=1027&k=5omzbKc) [](https://jq.qq.com/?_wv=1027&k=qPIKBb7s) [](https://jq.qq.com/?_wv=1027&k=4NsjKbtU) [](https://jq.qq.com/?_wv=1027&k=VD2pkz2G) [](https://jq.qq.com/?_wv=1027&k=HlshFwkJ) [](https://jq.qq.com/?_wv=1027&k=0ARRrO9V) [](https://jq.qq.com/?_wv=1027&k=up9k3ZXJ) [](https://jq.qq.com/?_wv=1027&k=540WfdEr) [](https://jq.qq.com/?_wv=1027&k=ss91fC4t) [](https://jq.qq.com/?_wv=1027&k=Cqd66IKe) [](https://jq.qq.com/?_wv=1027&k=7FplYUnR) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=lqMHu_5Fskm7H2S1vNAQTtzAUokVydwc&authKey=ptw0Fpch5pbNocML3CIJKKqZBaq2DI7cusKuzIgfMNiY3t9Pvd9hP%2BA8WYx3yaY1&noverify=0&group_code=174942938) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=blYlRDmwZXSXI5pVrPPU7ZJ1stFJ6Q2Q&authKey=ForGBWffHVlPt9NE3d7g4DoOIouBh%2BqvAj2lp1CLReHfZAUaK7SRrdwsChKpRJDJ&noverify=0&group_code=287843737) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=KTVAIhggR3rR3uZWK9A8kR4yYNREQ4jo&authKey=An4DUV9e7uK8I8VgBbp949z0ypQoDrOoqvVg%2FWOr2vuNNDMZUAMPvqHor6TFMIgz&noverify=0&group_code=232896766) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=XwhV8deuZXt__yteR1clNanVSXzA-ugq&authKey=ezgwKqEZPdP%2FgC9I03OBkJb%2Biii8yvVfwrcQuu0%2FL6ILXcRdHYDBFKCXeoeBT0E6&noverify=0&group_code=180208928) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=WqsGDxpGkqOPeWGOf3I32f_rXxdhqYNr&authKey=kvdF5df7PO9bzWxmixKhZN6ShsECBiuGUmmzTZBWVr2MVOfJ8%2F4oD0Gws0rbgYfz&noverify=0&group_code=140284548)
|
||||||
124
pom.xml
124
pom.xml
@@ -15,41 +15,85 @@
|
|||||||
<ruoyi.version>4.8.2</ruoyi.version>
|
<ruoyi.version>4.8.2</ruoyi.version>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
<java.version>17</java.version>
|
<java.version>1.8</java.version>
|
||||||
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
|
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
|
||||||
<shiro.version>2.0.6</shiro.version>
|
<spring-boot.version>2.5.15</spring-boot.version>
|
||||||
<mybatis-spring-boot.version>3.0.5</mybatis-spring-boot.version>
|
<shiro.version>1.13.0</shiro.version>
|
||||||
<thymeleaf.extras.shiro.version>2.1.0</thymeleaf.extras.shiro.version>
|
<thymeleaf.extras.shiro.version>2.1.0</thymeleaf.extras.shiro.version>
|
||||||
<druid.version>1.2.27</druid.version>
|
<druid.version>1.2.27</druid.version>
|
||||||
<yauaa.version>7.32.0</yauaa.version>
|
<yauaa.version>7.32.0</yauaa.version>
|
||||||
<kaptcha.version>2.3.3</kaptcha.version>
|
<kaptcha.version>2.3.3</kaptcha.version>
|
||||||
<pagehelper.boot.version>2.1.1</pagehelper.boot.version>
|
<swagger.version>3.0.0</swagger.version>
|
||||||
|
<pagehelper.boot.version>1.4.7</pagehelper.boot.version>
|
||||||
<fastjson.version>1.2.83</fastjson.version>
|
<fastjson.version>1.2.83</fastjson.version>
|
||||||
<oshi.version>6.9.1</oshi.version>
|
<oshi.version>6.9.1</oshi.version>
|
||||||
<commons.io.version>2.21.0</commons.io.version>
|
<commons.io.version>2.21.0</commons.io.version>
|
||||||
<poi.version>4.1.2</poi.version>
|
<poi.version>4.1.2</poi.version>
|
||||||
<quartz.version>2.5.2</quartz.version>
|
|
||||||
<velocity.version>2.3</velocity.version>
|
<velocity.version>2.3</velocity.version>
|
||||||
<springdoc.version>2.8.14</springdoc.version>
|
<!-- override dependency version -->
|
||||||
|
<tomcat.version>9.0.112</tomcat.version>
|
||||||
|
<logback.version>1.2.13</logback.version>
|
||||||
|
<spring-framework.version>5.3.39</spring-framework.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<!-- 依赖声明 -->
|
<!-- 依赖声明 -->
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
|
<!-- 覆盖SpringFramework的依赖配置-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-framework-bom</artifactId>
|
||||||
|
<version>${spring-framework.version}</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- SpringBoot的依赖配置-->
|
<!-- SpringBoot的依赖配置-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-dependencies</artifactId>
|
<artifactId>spring-boot-dependencies</artifactId>
|
||||||
<version>3.5.8</version>
|
<version>${spring-boot.version}</version>
|
||||||
<type>pom</type>
|
<type>pom</type>
|
||||||
<scope>import</scope>
|
<scope>import</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 覆盖logback的依赖配置-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>ch.qos.logback</groupId>
|
||||||
|
<artifactId>logback-core</artifactId>
|
||||||
|
<version>${logback.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>ch.qos.logback</groupId>
|
||||||
|
<artifactId>logback-classic</artifactId>
|
||||||
|
<version>${logback.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 覆盖tomcat的依赖配置-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.tomcat.embed</groupId>
|
||||||
|
<artifactId>tomcat-embed-core</artifactId>
|
||||||
|
<version>${tomcat.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.tomcat.embed</groupId>
|
||||||
|
<artifactId>tomcat-embed-el</artifactId>
|
||||||
|
<version>${tomcat.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.tomcat.embed</groupId>
|
||||||
|
<artifactId>tomcat-embed-websocket</artifactId>
|
||||||
|
<version>${tomcat.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- 阿里数据库连接池 -->
|
<!-- 阿里数据库连接池 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba</groupId>
|
<groupId>com.alibaba</groupId>
|
||||||
<artifactId>druid-spring-boot-3-starter</artifactId>
|
<artifactId>druid-spring-boot-starter</artifactId>
|
||||||
<version>${druid.version}</version>
|
<version>${druid.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
@@ -64,14 +108,6 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.shiro</groupId>
|
<groupId>org.apache.shiro</groupId>
|
||||||
<artifactId>shiro-core</artifactId>
|
<artifactId>shiro-core</artifactId>
|
||||||
<classifier>jakarta</classifier>
|
|
||||||
<version>${shiro.version}</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.shiro</groupId>
|
|
||||||
<artifactId>shiro-web</artifactId>
|
|
||||||
<classifier>jakarta</classifier>
|
|
||||||
<version>${shiro.version}</version>
|
<version>${shiro.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
@@ -79,15 +115,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.shiro</groupId>
|
<groupId>org.apache.shiro</groupId>
|
||||||
<artifactId>shiro-spring</artifactId>
|
<artifactId>shiro-spring</artifactId>
|
||||||
<classifier>jakarta</classifier>
|
|
||||||
<version>${shiro.version}</version>
|
<version>${shiro.version}</version>
|
||||||
<!-- 排除仍使用了javax.servlet的依赖 -->
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.apache.shiro</groupId>
|
|
||||||
<artifactId>shiro-web</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Shiro使用EhCache缓存框架 -->
|
<!-- Shiro使用EhCache缓存框架 -->
|
||||||
@@ -104,25 +132,6 @@
|
|||||||
<version>${thymeleaf.extras.shiro.version}</version>
|
<version>${thymeleaf.extras.shiro.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- mybatis依赖 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.mybatis.spring.boot</groupId>
|
|
||||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
|
||||||
<version>${mybatis-spring-boot.version}</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.mysql</groupId>
|
|
||||||
<artifactId>mysql-connector-j</artifactId>
|
|
||||||
<version>8.1.0</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>jakarta.servlet</groupId>
|
|
||||||
<artifactId>jakarta.servlet-api</artifactId>
|
|
||||||
<version>6.0.0</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- 解析客户端操作系统、浏览器等 -->
|
<!-- 解析客户端操作系统、浏览器等 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>nl.basjes.parse.useragent</groupId>
|
<groupId>nl.basjes.parse.useragent</groupId>
|
||||||
@@ -144,11 +153,17 @@
|
|||||||
<version>${oshi.version}</version>
|
<version>${oshi.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- spring-doc -->
|
<!-- Swagger3依赖 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springdoc</groupId>
|
<groupId>io.springfox</groupId>
|
||||||
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
|
<artifactId>springfox-boot-starter</artifactId>
|
||||||
<version>${springdoc.version}</version>
|
<version>${swagger.version}</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>io.swagger</groupId>
|
||||||
|
<artifactId>swagger-models</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- io常用工具类 -->
|
<!-- io常用工具类 -->
|
||||||
@@ -172,13 +187,6 @@
|
|||||||
<version>${velocity.version}</version>
|
<version>${velocity.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 定时任务 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.quartz-scheduler</groupId>
|
|
||||||
<artifactId>quartz</artifactId>
|
|
||||||
<version>${quartz.version}</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- 阿里JSON解析器 -->
|
<!-- 阿里JSON解析器 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba</groupId>
|
<groupId>com.alibaba</groupId>
|
||||||
@@ -244,19 +252,13 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.13.0</version>
|
<version>3.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<parameters>true</parameters>
|
|
||||||
<source>${java.version}</source>
|
<source>${java.version}</source>
|
||||||
<target>${java.version}</target>
|
<target>${java.version}</target>
|
||||||
<encoding>${project.build.sourceEncoding}</encoding>
|
<encoding>${project.build.sourceEncoding}</encoding>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
||||||
<version>3.3.0</version>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
|||||||
@@ -30,16 +30,23 @@
|
|||||||
<optional>true</optional> <!-- 表示依赖不会传递 -->
|
<optional>true</optional> <!-- 表示依赖不会传递 -->
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- spring-doc -->
|
<!-- swagger3-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springdoc</groupId>
|
<groupId>io.springfox</groupId>
|
||||||
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
|
<artifactId>springfox-boot-starter</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 防止进入swagger页面报类型转换错误,排除3.0.0中的引用,手动增加1.6.2版本 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.swagger</groupId>
|
||||||
|
<artifactId>swagger-models</artifactId>
|
||||||
|
<version>1.6.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Mysql驱动包 -->
|
<!-- Mysql驱动包 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.mysql</groupId>
|
<groupId>mysql</groupId>
|
||||||
<artifactId>mysql-connector-j</artifactId>
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 核心模块-->
|
<!-- 核心模块-->
|
||||||
@@ -67,9 +74,9 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
<version>3.5.4</version>
|
<version>2.5.15</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<addResources>true</addResources>
|
<fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
|
||||||
</configuration>
|
</configuration>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
@@ -82,7 +89,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-war-plugin</artifactId>
|
<artifactId>maven-war-plugin</artifactId>
|
||||||
<version>3.1.0</version>
|
<version>3.0.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||||
<warName>${project.artifactId}</warName>
|
<warName>${project.artifactId}</warName>
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package com.ruoyi.web.controller.common;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|||||||
@@ -2,12 +2,12 @@ package com.ruoyi.web.controller.system;
|
|||||||
|
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import jakarta.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
import jakarta.servlet.ServletOutputStream;
|
import javax.servlet.ServletOutputStream;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import jakarta.servlet.http.HttpSession;
|
import javax.servlet.http.HttpSession;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ package com.ruoyi.web.controller.system;
|
|||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import jakarta.servlet.http.Cookie;
|
import javax.servlet.http.Cookie;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.ModelMap;
|
import org.springframework.ui.ModelMap;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.ruoyi.web.controller.system;
|
package com.ruoyi.web.controller.system;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.apache.shiro.authc.AuthenticationException;
|
import org.apache.shiro.authc.AuthenticationException;
|
||||||
import org.apache.shiro.authc.UsernamePasswordToken;
|
import org.apache.shiro.authc.UsernamePasswordToken;
|
||||||
|
|||||||
@@ -15,16 +15,19 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.R;
|
import com.ruoyi.common.core.domain.R;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* swagger 用户测试方法
|
* swagger 用户测试方法
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
@Tag(name = "用户信息管理")
|
@Api("用户信息管理")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/test/user")
|
@RequestMapping("/test/user")
|
||||||
public class TestController extends BaseController
|
public class TestController extends BaseController
|
||||||
@@ -35,7 +38,7 @@ public class TestController extends BaseController
|
|||||||
users.put(2, new UserEntity(2, "ry", "admin123", "15666666666"));
|
users.put(2, new UserEntity(2, "ry", "admin123", "15666666666"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "获取用户列表")
|
@ApiOperation("获取用户列表")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public R<List<UserEntity>> userList()
|
public R<List<UserEntity>> userList()
|
||||||
{
|
{
|
||||||
@@ -43,10 +46,10 @@ public class TestController extends BaseController
|
|||||||
return R.ok(userList);
|
return R.ok(userList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "获取用户详细")
|
@ApiOperation("获取用户详细")
|
||||||
|
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
|
||||||
@GetMapping("/{userId}")
|
@GetMapping("/{userId}")
|
||||||
public R<UserEntity> getUser(@PathVariable(name = "userId")
|
public R<UserEntity> getUser(@PathVariable Integer userId)
|
||||||
Integer userId)
|
|
||||||
{
|
{
|
||||||
if (!users.isEmpty() && users.containsKey(userId))
|
if (!users.isEmpty() && users.containsKey(userId))
|
||||||
{
|
{
|
||||||
@@ -58,7 +61,13 @@ public class TestController extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "新增用户")
|
@ApiOperation("新增用户")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "userId", value = "用户id", dataType = "Integer", dataTypeClass = Integer.class),
|
||||||
|
@ApiImplicitParam(name = "username", value = "用户名称", dataType = "String", dataTypeClass = String.class),
|
||||||
|
@ApiImplicitParam(name = "password", value = "用户密码", dataType = "String", dataTypeClass = String.class),
|
||||||
|
@ApiImplicitParam(name = "mobile", value = "用户手机", dataType = "String", dataTypeClass = String.class)
|
||||||
|
})
|
||||||
@PostMapping("/save")
|
@PostMapping("/save")
|
||||||
public R<String> save(UserEntity user)
|
public R<String> save(UserEntity user)
|
||||||
{
|
{
|
||||||
@@ -70,10 +79,9 @@ public class TestController extends BaseController
|
|||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "更新用户")
|
@ApiOperation("更新用户")
|
||||||
@PutMapping("/update")
|
@PutMapping("/update")
|
||||||
public R<String> update(@RequestBody
|
public R<String> update(@RequestBody UserEntity user)
|
||||||
UserEntity user)
|
|
||||||
{
|
{
|
||||||
if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId()))
|
if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId()))
|
||||||
{
|
{
|
||||||
@@ -88,10 +96,10 @@ public class TestController extends BaseController
|
|||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "删除用户信息")
|
@ApiOperation("删除用户信息")
|
||||||
|
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
|
||||||
@DeleteMapping("/{userId}")
|
@DeleteMapping("/{userId}")
|
||||||
public R<String> delete(@PathVariable(name = "userId")
|
public R<String> delete(@PathVariable Integer userId)
|
||||||
Integer userId)
|
|
||||||
{
|
{
|
||||||
if (!users.isEmpty() && users.containsKey(userId))
|
if (!users.isEmpty() && users.containsKey(userId))
|
||||||
{
|
{
|
||||||
@@ -105,19 +113,19 @@ public class TestController extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Schema(description = "用户实体")
|
@ApiModel(value = "UserEntity", description = "用户实体")
|
||||||
class UserEntity
|
class UserEntity
|
||||||
{
|
{
|
||||||
@Schema(title = "用户ID")
|
@ApiModelProperty("用户ID")
|
||||||
private Integer userId;
|
private Integer userId;
|
||||||
|
|
||||||
@Schema(title = "用户名称")
|
@ApiModelProperty("用户名称")
|
||||||
private String username;
|
private String username;
|
||||||
|
|
||||||
@Schema(title = "用户密码")
|
@ApiModelProperty("用户密码")
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
@Schema(title = "用户手机")
|
@ApiModelProperty("用户手机")
|
||||||
private String mobile;
|
private String mobile;
|
||||||
|
|
||||||
public UserEntity()
|
public UserEntity()
|
||||||
|
|||||||
@@ -1,15 +1,17 @@
|
|||||||
package com.ruoyi.web.core.config;
|
package com.ruoyi.web.core.config;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import com.ruoyi.common.config.RuoYiConfig;
|
import com.ruoyi.common.config.RuoYiConfig;
|
||||||
import io.swagger.v3.oas.models.Components;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import io.swagger.v3.oas.models.OpenAPI;
|
import springfox.documentation.builders.ApiInfoBuilder;
|
||||||
import io.swagger.v3.oas.models.info.Contact;
|
import springfox.documentation.builders.PathSelectors;
|
||||||
import io.swagger.v3.oas.models.info.Info;
|
import springfox.documentation.builders.RequestHandlerSelectors;
|
||||||
import io.swagger.v3.oas.models.security.SecurityRequirement;
|
import springfox.documentation.service.ApiInfo;
|
||||||
import io.swagger.v3.oas.models.security.SecurityScheme;
|
import springfox.documentation.service.Contact;
|
||||||
|
import springfox.documentation.spi.DocumentationType;
|
||||||
|
import springfox.documentation.spring.web.plugins.Docket;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger2的接口配置
|
* Swagger2的接口配置
|
||||||
@@ -19,47 +21,47 @@ import io.swagger.v3.oas.models.security.SecurityScheme;
|
|||||||
@Configuration
|
@Configuration
|
||||||
public class SwaggerConfig
|
public class SwaggerConfig
|
||||||
{
|
{
|
||||||
/** 系统基础配置 */
|
/** 是否开启swagger */
|
||||||
@Autowired
|
@Value("${swagger.enabled}")
|
||||||
private RuoYiConfig ruoyiConfig;
|
private boolean enabled;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自定义的 OpenAPI 对象
|
* 创建API
|
||||||
*/
|
*/
|
||||||
@Bean
|
@Bean
|
||||||
public OpenAPI customOpenApi()
|
public Docket createRestApi()
|
||||||
{
|
{
|
||||||
return new OpenAPI().components(new Components()
|
return new Docket(DocumentationType.OAS_30)
|
||||||
// 设置认证的请求头
|
// 是否启用Swagger
|
||||||
.addSecuritySchemes("apikey", securityScheme()))
|
.enable(enabled)
|
||||||
.addSecurityItem(new SecurityRequirement().addList("apikey"))
|
// 用来创建该API的基本信息,展示在文档的页面中(自定义展示的信息)
|
||||||
.info(getApiInfo());
|
.apiInfo(apiInfo())
|
||||||
}
|
// 设置哪些接口暴露给Swagger展示
|
||||||
|
.select()
|
||||||
@Bean
|
// 扫描所有有注解的api,用这种方式更灵活
|
||||||
public SecurityScheme securityScheme()
|
.apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
|
||||||
{
|
// 扫描指定包中的swagger注解
|
||||||
return new SecurityScheme()
|
//.apis(RequestHandlerSelectors.basePackage("com.ruoyi.project.tool.swagger"))
|
||||||
.type(SecurityScheme.Type.APIKEY)
|
// 扫描所有 .apis(RequestHandlerSelectors.any())
|
||||||
.name("Authorization")
|
.paths(PathSelectors.any())
|
||||||
.in(SecurityScheme.In.HEADER)
|
.build();
|
||||||
.scheme("Bearer");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加摘要信息
|
* 添加摘要信息
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("static-access")
|
private ApiInfo apiInfo()
|
||||||
public Info getApiInfo()
|
|
||||||
{
|
{
|
||||||
return new Info()
|
// 用ApiInfoBuilder进行定制
|
||||||
// 设置标题
|
return new ApiInfoBuilder()
|
||||||
.title("标题:若依管理系统_接口文档")
|
// 设置标题
|
||||||
// 描述
|
.title("标题:若依管理系统_接口文档")
|
||||||
.description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...")
|
// 描述
|
||||||
// 作者信息
|
.description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...")
|
||||||
.contact(new Contact().name(ruoyiConfig.getName()))
|
// 作者信息
|
||||||
// 版本
|
.contact(new Contact(RuoYiConfig.getName(), null, null))
|
||||||
.version("版本号:" + ruoyiConfig.getVersion());
|
// 版本
|
||||||
|
.version("版本号:" + RuoYiConfig.getVersion())
|
||||||
|
.build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -127,20 +127,6 @@ shiro:
|
|||||||
# 是否开启记住我
|
# 是否开启记住我
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
||||||
# Springdoc配置
|
|
||||||
springdoc:
|
|
||||||
api-docs:
|
|
||||||
path: /v3/api-docs
|
|
||||||
swagger-ui:
|
|
||||||
enabled: true
|
|
||||||
path: /swagger-ui.html
|
|
||||||
tags-sorter: alpha
|
|
||||||
group-configs:
|
|
||||||
- group: 'default'
|
|
||||||
display-name: '测试模块'
|
|
||||||
paths-to-match: '/**'
|
|
||||||
packages-to-scan: com.ruoyi.web.controller.tool
|
|
||||||
|
|
||||||
# 防止XSS攻击
|
# 防止XSS攻击
|
||||||
xss:
|
xss:
|
||||||
# 过滤开关
|
# 过滤开关
|
||||||
@@ -156,3 +142,8 @@ csrf:
|
|||||||
enabled: false
|
enabled: false
|
||||||
# 白名单(多个用逗号分隔)
|
# 白名单(多个用逗号分隔)
|
||||||
whites: /druid
|
whites: /druid
|
||||||
|
|
||||||
|
# Swagger配置
|
||||||
|
swagger:
|
||||||
|
# 是否开启swagger
|
||||||
|
enabled: true
|
||||||
|
|||||||
@@ -75,8 +75,6 @@
|
|||||||
<logger name="com.ruoyi" level="info" />
|
<logger name="com.ruoyi" level="info" />
|
||||||
<!-- Spring日志级别控制 -->
|
<!-- Spring日志级别控制 -->
|
||||||
<logger name="org.springframework" level="warn" />
|
<logger name="org.springframework" level="warn" />
|
||||||
<!-- Thymeleaf日志级别控制 -->
|
|
||||||
<Logger name="org.thymeleaf" level="error"/>
|
|
||||||
|
|
||||||
<root level="info">
|
<root level="info">
|
||||||
<appender-ref ref="console" />
|
<appender-ref ref="console" />
|
||||||
|
|||||||
@@ -67,7 +67,7 @@
|
|||||||
<div class="ibox-content">
|
<div class="ibox-content">
|
||||||
<p><i class="fa fa-send-o"></i> 官网:<a href="http://www.ruoyi.vip" target="_blank">http://www.ruoyi.vip</a>
|
<p><i class="fa fa-send-o"></i> 官网:<a href="http://www.ruoyi.vip" target="_blank">http://www.ruoyi.vip</a>
|
||||||
</p>
|
</p>
|
||||||
<p><i class="fa fa-qq"></i> QQ群:<s>满1389287</s> <s>满1679294</s> <s>满1529866</s> <s>满1772718</s> <s>满1366522</s> <s>满1382251</s> <s>满1145125</s> <s>满86752435</s> <s>满134072510</s> <s>满210336300</s> <s>满339522636</s> <s>满130035985</s> <s>满143151071</s> <s>满158781320</s> <s>满201531282</s> <s>满101526938</s> <s>满264355400</s> <s>满298522656</s> <s>满139845794</s> <s>满185760789</s> <s>满175104288</s> <s>满174942938</s> <s>满287843737</s> <s>满232896766</s> <s>满180208928</s> <s>满140284548</s> <a href="http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=z9z9jkkkinfAElKZk2FXqlN4XIXlXsMi&authKey=Sm9XMTV%2FFyANBrv9rVpMfMNcX4v1lVah3795O9VclQwU4DNzQcT5BLXTmTBouIkM&noverify=0&group_code=177203794" target="_blank">177203794</a>
|
<p><i class="fa fa-qq"></i> QQ群:<s>满1389287</s> <s>满1679294</s> <s>满1529866</s> <s>满1772718</s> <s>满1366522</s> <s>满1382251</s> <s>满1145125</s> <s>满86752435</s> <s>满134072510</s> <s>满210336300</s> <s>满339522636</s> <s>满130035985</s> <s>满143151071</s> <s>满158781320</s> <s>满201531282</s> <s>满101526938</s> <s>满264355400</s> <s>满298522656</s> <s>满139845794</s> <s>满185760789</s> <s>满175104288</s> <s>满174942938</s> <s>满287843737</s> <s>满232896766</s> <s>满180208928</s> <a href="http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=WqsGDxpGkqOPeWGOf3I32f_rXxdhqYNr&authKey=kvdF5df7PO9bzWxmixKhZN6ShsECBiuGUmmzTZBWVr2MVOfJ8%2F4oD0Gws0rbgYfz&noverify=0&group_code=140284548" target="_blank">140284548</a>
|
||||||
</p>
|
</p>
|
||||||
<p><i class="fa fa-weixin"></i> 微信:<a href="javascript:;">/ *若依</a>
|
<p><i class="fa fa-weixin"></i> 微信:<a href="javascript:;">/ *若依</a>
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -33,7 +33,6 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.shiro</groupId>
|
<groupId>org.apache.shiro</groupId>
|
||||||
<artifactId>shiro-core</artifactId>
|
<artifactId>shiro-core</artifactId>
|
||||||
<classifier>jakarta</classifier>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Shiro使用EhCache缓存框架 -->
|
<!-- Shiro使用EhCache缓存框架 -->
|
||||||
@@ -92,8 +91,8 @@
|
|||||||
|
|
||||||
<!-- servlet包 -->
|
<!-- servlet包 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>jakarta.servlet</groupId>
|
<groupId>javax.servlet</groupId>
|
||||||
<artifactId>jakarta.servlet-api</artifactId>
|
<artifactId>javax.servlet-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|||||||
@@ -56,8 +56,7 @@ public @interface Excel
|
|||||||
/**
|
/**
|
||||||
* BigDecimal 舍入规则 默认:BigDecimal.ROUND_HALF_EVEN
|
* BigDecimal 舍入规则 默认:BigDecimal.ROUND_HALF_EVEN
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("deprecation")
|
public int roundingMode() default BigDecimal.ROUND_HALF_EVEN;
|
||||||
public int roundingMode() default BigDecimal.ROUND_HALF_EVEN;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出时在excel中每个列的高度
|
* 导出时在excel中每个列的高度
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.ruoyi.common.config;
|
package com.ruoyi.common.config;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import com.ruoyi.common.utils.ServletUtils;
|
import com.ruoyi.common.utils.ServletUtils;
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ package com.ruoyi.common.core.controller;
|
|||||||
import java.beans.PropertyEditorSupport;
|
import java.beans.PropertyEditorSupport;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import jakarta.servlet.http.HttpSession;
|
import javax.servlet.http.HttpSession;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.web.bind.WebDataBinder;
|
import org.springframework.web.bind.WebDataBinder;
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package com.ruoyi.common.core.domain.entity;
|
package com.ruoyi.common.core.domain.entity;
|
||||||
|
|
||||||
import jakarta.validation.constraints.Email;
|
import javax.validation.constraints.Email;
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import jakarta.validation.constraints.Size;
|
import javax.validation.constraints.Size;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.ruoyi.common.core.domain.entity;
|
package com.ruoyi.common.core.domain.entity;
|
||||||
|
|
||||||
import jakarta.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.ruoyi.common.annotation.Excel;
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.ruoyi.common.core.domain.entity;
|
package com.ruoyi.common.core.domain.entity;
|
||||||
|
|
||||||
import jakarta.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.ruoyi.common.annotation.Excel;
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package com.ruoyi.common.core.domain.entity;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import jakarta.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.ruoyi.common.core.domain.entity;
|
package com.ruoyi.common.core.domain.entity;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import jakarta.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.ruoyi.common.annotation.Excel;
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package com.ruoyi.common.core.domain.entity;
|
|||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import jakarta.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ package com.ruoyi.common.utils;
|
|||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.net.URLDecoder;
|
import java.net.URLDecoder;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import jakarta.servlet.http.Cookie;
|
import javax.servlet.http.Cookie;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cookie工具类
|
* Cookie工具类
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import org.apache.commons.lang3.time.DateFormatUtils;
|
|||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
public class DateUtils extends org.apache.commons.lang3.time.DateUtils
|
public class DateUtils extends org.apache.commons.lang3.time.DateUtils
|
||||||
{
|
{
|
||||||
public static String YYYY = "yyyy";
|
public static String YYYY = "yyyy";
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package com.ruoyi.common.utils;
|
|||||||
|
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.net.UnknownHostException;
|
import java.net.UnknownHostException;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取IP方法
|
* 获取IP方法
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package com.ruoyi.common.utils;
|
|||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
import java.io.StringWriter;
|
import java.io.StringWriter;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@@ -72,10 +72,10 @@ public class LogUtils
|
|||||||
{
|
{
|
||||||
String username = getUsername();
|
String username = getUsername();
|
||||||
|
|
||||||
Integer statusCode = (Integer) request.getAttribute("jakarta.servlet.error.status_code");
|
Integer statusCode = (Integer) request.getAttribute("javax.servlet.error.status_code");
|
||||||
String message = (String) request.getAttribute("jakarta.servlet.error.message");
|
String message = (String) request.getAttribute("javax.servlet.error.message");
|
||||||
String uri = (String) request.getAttribute("jakarta.servlet.error.request_uri");
|
String uri = (String) request.getAttribute("javax.servlet.error.request_uri");
|
||||||
Throwable t = (Throwable) request.getAttribute("jakarta.servlet.error.exception");
|
Throwable t = (Throwable) request.getAttribute("javax.servlet.error.exception");
|
||||||
|
|
||||||
if (statusCode == null)
|
if (statusCode == null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import java.util.HashMap;
|
|||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Map通用处理方法
|
* Map通用处理方法
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import java.net.URLDecoder;
|
|||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.security.SecureRandom;
|
import java.security.SecureRandom;
|
||||||
import java.util.Base64;
|
import java.util.Base64;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import jakarta.servlet.http.HttpSession;
|
import javax.servlet.http.HttpSession;
|
||||||
import org.springframework.web.context.request.RequestAttributes;
|
import org.springframework.web.context.request.RequestAttributes;
|
||||||
import org.springframework.web.context.request.RequestContextHolder;
|
import org.springframework.web.context.request.RequestContextHolder;
|
||||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ import com.ruoyi.common.core.text.StrFormatter;
|
|||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
public class StringUtils extends org.apache.commons.lang3.StringUtils
|
public class StringUtils extends org.apache.commons.lang3.StringUtils
|
||||||
{
|
{
|
||||||
/** 空字符串 */
|
/** 空字符串 */
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package com.ruoyi.common.utils.bean;
|
package com.ruoyi.common.utils.bean;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import jakarta.validation.ConstraintViolation;
|
import javax.validation.ConstraintViolation;
|
||||||
import jakarta.validation.ConstraintViolationException;
|
import javax.validation.ConstraintViolationException;
|
||||||
import jakarta.validation.Validator;
|
import javax.validation.Validator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* bean对象属性验证
|
* bean对象属性验证
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import java.io.OutputStream;
|
|||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import org.apache.commons.io.FilenameUtils;
|
import org.apache.commons.io.FilenameUtils;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import java.util.Map;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
import org.apache.commons.lang3.RegExUtils;
|
import org.apache.commons.lang3.RegExUtils;
|
||||||
import org.apache.commons.lang3.reflect.FieldUtils;
|
import org.apache.commons.lang3.reflect.FieldUtils;
|
||||||
@@ -418,7 +418,7 @@ public class ExcelUtil<T>
|
|||||||
Object val = this.getCellValue(row, entry.getKey());
|
Object val = this.getCellValue(row, entry.getKey());
|
||||||
|
|
||||||
// 如果不存在实例则新建.
|
// 如果不存在实例则新建.
|
||||||
entity = (entity == null ? clazz.getDeclaredConstructor().newInstance() : entity);
|
entity = (entity == null ? clazz.newInstance() : entity);
|
||||||
// 从map中得到对应列的field.
|
// 从map中得到对应列的field.
|
||||||
Field field = (Field) entry.getValue()[0];
|
Field field = (Field) entry.getValue()[0];
|
||||||
Excel attr = (Excel) entry.getValue()[1];
|
Excel attr = (Excel) entry.getValue()[1];
|
||||||
@@ -1124,8 +1124,7 @@ public class ExcelUtil<T>
|
|||||||
/**
|
/**
|
||||||
* 添加单元格
|
* 添加单元格
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("deprecation")
|
public Cell addCell(Excel attr, Row row, T vo, Field field, int column)
|
||||||
public Cell addCell(Excel attr, Row row, T vo, Field field, int column)
|
|
||||||
{
|
{
|
||||||
Cell cell = null;
|
Cell cell = null;
|
||||||
try
|
try
|
||||||
@@ -1411,7 +1410,7 @@ public class ExcelUtil<T>
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Object instance = excel.handler().getDeclaredConstructor().newInstance();
|
Object instance = excel.handler().newInstance();
|
||||||
Method formatMethod = excel.handler().getMethod("format", new Class[] { Object.class, String[].class, Cell.class, Workbook.class });
|
Method formatMethod = excel.handler().getMethod("format", new Class[] { Object.class, String[].class, Cell.class, Workbook.class });
|
||||||
value = formatMethod.invoke(instance, value, excel.args(), cell, this.wb);
|
value = formatMethod.invoke(instance, value, excel.args(), cell, this.wb);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -315,8 +315,7 @@ public class ReflectUtils
|
|||||||
/**
|
/**
|
||||||
* 改变private/protected的方法为public,尽量不调用实际改动的语句,避免JDK的SecurityManager抱怨。
|
* 改变private/protected的方法为public,尽量不调用实际改动的语句,避免JDK的SecurityManager抱怨。
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("deprecation")
|
public static void makeAccessible(Method method)
|
||||||
public static void makeAccessible(Method method)
|
|
||||||
{
|
{
|
||||||
if ((!Modifier.isPublic(method.getModifiers()) || !Modifier.isPublic(method.getDeclaringClass().getModifiers()))
|
if ((!Modifier.isPublic(method.getModifiers()) || !Modifier.isPublic(method.getDeclaringClass().getModifiers()))
|
||||||
&& !method.isAccessible())
|
&& !method.isAccessible())
|
||||||
@@ -328,8 +327,7 @@ public class ReflectUtils
|
|||||||
/**
|
/**
|
||||||
* 改变private/protected的成员变量为public,尽量不调用实际改动的语句,避免JDK的SecurityManager抱怨。
|
* 改变private/protected的成员变量为public,尽量不调用实际改动的语句,避免JDK的SecurityManager抱怨。
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("deprecation")
|
public static void makeAccessible(Field field)
|
||||||
public static void makeAccessible(Field field)
|
|
||||||
{
|
{
|
||||||
if ((!Modifier.isPublic(field.getModifiers()) || !Modifier.isPublic(field.getDeclaringClass().getModifiers())
|
if ((!Modifier.isPublic(field.getModifiers()) || !Modifier.isPublic(field.getDeclaringClass().getModifiers())
|
||||||
|| Modifier.isFinal(field.getModifiers())) && !field.isAccessible())
|
|| Modifier.isFinal(field.getModifiers())) && !field.isAccessible())
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.ruoyi.common.xss;
|
package com.ruoyi.common.xss;
|
||||||
|
|
||||||
import jakarta.validation.Constraint;
|
import javax.validation.Constraint;
|
||||||
import jakarta.validation.Payload;
|
import javax.validation.Payload;
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
|||||||
@@ -3,14 +3,14 @@ package com.ruoyi.common.xss;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import jakarta.servlet.Filter;
|
import javax.servlet.Filter;
|
||||||
import jakarta.servlet.FilterChain;
|
import javax.servlet.FilterChain;
|
||||||
import jakarta.servlet.FilterConfig;
|
import javax.servlet.FilterConfig;
|
||||||
import jakarta.servlet.ServletException;
|
import javax.servlet.ServletException;
|
||||||
import jakarta.servlet.ServletRequest;
|
import javax.servlet.ServletRequest;
|
||||||
import jakarta.servlet.ServletResponse;
|
import javax.servlet.ServletResponse;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.ruoyi.common.xss;
|
package com.ruoyi.common.xss;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletRequestWrapper;
|
import javax.servlet.http.HttpServletRequestWrapper;
|
||||||
import com.ruoyi.common.utils.html.EscapeUtil;
|
import com.ruoyi.common.utils.html.EscapeUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package com.ruoyi.common.xss;
|
package com.ruoyi.common.xss;
|
||||||
|
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import jakarta.validation.ConstraintValidator;
|
import javax.validation.ConstraintValidator;
|
||||||
import jakarta.validation.ConstraintValidatorContext;
|
import javax.validation.ConstraintValidatorContext;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
<!-- 阿里数据库连接池 -->
|
<!-- 阿里数据库连接池 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba</groupId>
|
<groupId>com.alibaba</groupId>
|
||||||
<artifactId>druid-spring-boot-3-starter</artifactId>
|
<artifactId>druid-spring-boot-starter</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 验证码 -->
|
<!-- 验证码 -->
|
||||||
@@ -51,20 +51,6 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.shiro</groupId>
|
<groupId>org.apache.shiro</groupId>
|
||||||
<artifactId>shiro-spring</artifactId>
|
<artifactId>shiro-spring</artifactId>
|
||||||
<classifier>jakarta</classifier>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- Shiro核心框架 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.shiro</groupId>
|
|
||||||
<artifactId>shiro-core</artifactId>
|
|
||||||
<classifier>jakarta</classifier>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.shiro</groupId>
|
|
||||||
<artifactId>shiro-web</artifactId>
|
|
||||||
<classifier>jakarta</classifier>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- thymeleaf模板引擎和shiro框架的整合 -->
|
<!-- thymeleaf模板引擎和shiro框架的整合 -->
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package com.ruoyi.framework.aspectj;
|
|||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
import org.aspectj.lang.JoinPoint;
|
import org.aspectj.lang.JoinPoint;
|
||||||
import org.aspectj.lang.annotation.AfterReturning;
|
import org.aspectj.lang.annotation.AfterReturning;
|
||||||
|
|||||||
@@ -3,6 +3,11 @@ package com.ruoyi.framework.config;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import javax.servlet.Filter;
|
||||||
|
import javax.servlet.FilterChain;
|
||||||
|
import javax.servlet.ServletException;
|
||||||
|
import javax.servlet.ServletRequest;
|
||||||
|
import javax.servlet.ServletResponse;
|
||||||
import javax.sql.DataSource;
|
import javax.sql.DataSource;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
@@ -11,18 +16,13 @@ import org.springframework.context.annotation.Bean;
|
|||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.context.annotation.Primary;
|
import org.springframework.context.annotation.Primary;
|
||||||
import com.alibaba.druid.pool.DruidDataSource;
|
import com.alibaba.druid.pool.DruidDataSource;
|
||||||
import com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceBuilder;
|
import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder;
|
||||||
import com.alibaba.druid.spring.boot3.autoconfigure.properties.DruidStatProperties;
|
import com.alibaba.druid.spring.boot.autoconfigure.properties.DruidStatProperties;
|
||||||
import com.alibaba.druid.util.Utils;
|
import com.alibaba.druid.util.Utils;
|
||||||
import com.ruoyi.common.enums.DataSourceType;
|
import com.ruoyi.common.enums.DataSourceType;
|
||||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||||
import com.ruoyi.framework.config.properties.DruidProperties;
|
import com.ruoyi.framework.config.properties.DruidProperties;
|
||||||
import com.ruoyi.framework.datasource.DynamicDataSource;
|
import com.ruoyi.framework.datasource.DynamicDataSource;
|
||||||
import jakarta.servlet.Filter;
|
|
||||||
import jakarta.servlet.FilterChain;
|
|
||||||
import jakarta.servlet.ServletException;
|
|
||||||
import jakarta.servlet.ServletRequest;
|
|
||||||
import jakarta.servlet.ServletResponse;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* druid 配置多数据源
|
* druid 配置多数据源
|
||||||
@@ -96,7 +96,7 @@ public class DruidConfig
|
|||||||
Filter filter = new Filter()
|
Filter filter = new Filter()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public void init(jakarta.servlet.FilterConfig filterConfig) throws ServletException
|
public void init(javax.servlet.FilterConfig filterConfig) throws ServletException
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package com.ruoyi.framework.config;
|
|||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import jakarta.servlet.DispatcherType;
|
import javax.servlet.DispatcherType;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
||||||
|
|||||||
@@ -4,12 +4,14 @@ import java.io.ByteArrayInputStream;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import javax.servlet.Filter;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.apache.shiro.cache.ehcache.EhCacheManager;
|
import org.apache.shiro.cache.ehcache.EhCacheManager;
|
||||||
|
import org.apache.shiro.codec.Base64;
|
||||||
import org.apache.shiro.config.ConfigurationException;
|
import org.apache.shiro.config.ConfigurationException;
|
||||||
import org.apache.shiro.lang.codec.Base64;
|
import org.apache.shiro.io.ResourceUtils;
|
||||||
import org.apache.shiro.lang.io.ResourceUtils;
|
|
||||||
import org.apache.shiro.mgt.SecurityManager;
|
import org.apache.shiro.mgt.SecurityManager;
|
||||||
import org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor;
|
import org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor;
|
||||||
import org.apache.shiro.spring.web.ShiroFilterFactoryBean;
|
import org.apache.shiro.spring.web.ShiroFilterFactoryBean;
|
||||||
@@ -23,6 +25,7 @@ import com.ruoyi.common.constant.Constants;
|
|||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.common.utils.security.CipherUtils;
|
import com.ruoyi.common.utils.security.CipherUtils;
|
||||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||||
|
import com.ruoyi.framework.config.properties.PermitAllUrlProperties;
|
||||||
import com.ruoyi.framework.shiro.realm.UserRealm;
|
import com.ruoyi.framework.shiro.realm.UserRealm;
|
||||||
import com.ruoyi.framework.shiro.rememberMe.CustomCookieRememberMeManager;
|
import com.ruoyi.framework.shiro.rememberMe.CustomCookieRememberMeManager;
|
||||||
import com.ruoyi.framework.shiro.session.OnlineSessionDAO;
|
import com.ruoyi.framework.shiro.session.OnlineSessionDAO;
|
||||||
@@ -37,7 +40,6 @@ import com.ruoyi.framework.shiro.web.filter.sync.SyncOnlineSessionFilter;
|
|||||||
import com.ruoyi.framework.shiro.web.session.OnlineWebSessionManager;
|
import com.ruoyi.framework.shiro.web.session.OnlineWebSessionManager;
|
||||||
import com.ruoyi.framework.shiro.web.session.SpringSessionValidationScheduler;
|
import com.ruoyi.framework.shiro.web.session.SpringSessionValidationScheduler;
|
||||||
import at.pollux.thymeleaf.shiro.dialect.ShiroDialect;
|
import at.pollux.thymeleaf.shiro.dialect.ShiroDialect;
|
||||||
import jakarta.servlet.Filter;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 权限配置加载
|
* 权限配置加载
|
||||||
@@ -312,6 +314,12 @@ public class ShiroConfig
|
|||||||
filterChainDefinitionMap.put("/js/**", "anon");
|
filterChainDefinitionMap.put("/js/**", "anon");
|
||||||
filterChainDefinitionMap.put("/ruoyi/**", "anon");
|
filterChainDefinitionMap.put("/ruoyi/**", "anon");
|
||||||
filterChainDefinitionMap.put("/captcha/captchaImage**", "anon");
|
filterChainDefinitionMap.put("/captcha/captchaImage**", "anon");
|
||||||
|
// 匿名访问不鉴权注解列表
|
||||||
|
List<String> permitAllUrl = SpringUtils.getBean(PermitAllUrlProperties.class).getUrls();
|
||||||
|
if (StringUtils.isNotEmpty(permitAllUrl))
|
||||||
|
{
|
||||||
|
permitAllUrl.forEach(url -> filterChainDefinitionMap.put(url, "anon"));
|
||||||
|
}
|
||||||
// 退出 logout地址,shiro去清除session
|
// 退出 logout地址,shiro去清除session
|
||||||
filterChainDefinitionMap.put("/logout", "logout");
|
filterChainDefinitionMap.put("/logout", "logout");
|
||||||
// 不需要拦截的访问
|
// 不需要拦截的访问
|
||||||
|
|||||||
@@ -0,0 +1,151 @@
|
|||||||
|
package com.ruoyi.framework.config.properties;
|
||||||
|
|
||||||
|
import java.lang.reflect.Method;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
import org.springframework.aop.framework.Advised;
|
||||||
|
import org.springframework.beans.BeansException;
|
||||||
|
import org.springframework.beans.factory.InitializingBean;
|
||||||
|
import org.springframework.context.ApplicationContext;
|
||||||
|
import org.springframework.context.ApplicationContextAware;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import com.ruoyi.common.annotation.Anonymous;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置Anonymous注解允许匿名访问的url
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
*/
|
||||||
|
@Configuration
|
||||||
|
public class PermitAllUrlProperties implements InitializingBean, ApplicationContextAware
|
||||||
|
{
|
||||||
|
private List<String> urls = new ArrayList<>();
|
||||||
|
|
||||||
|
private ApplicationContext applicationContext;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void afterPropertiesSet() throws Exception
|
||||||
|
{
|
||||||
|
Map<String, Object> controllers = applicationContext.getBeansWithAnnotation(Controller.class);
|
||||||
|
for (Object bean : controllers.values())
|
||||||
|
{
|
||||||
|
Class<?> beanClass;
|
||||||
|
if (bean instanceof Advised)
|
||||||
|
{
|
||||||
|
beanClass = ((Advised) bean).getTargetSource().getTarget().getClass();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
beanClass = bean.getClass();
|
||||||
|
}
|
||||||
|
// 处理类级别的匿名访问注解
|
||||||
|
if (beanClass.isAnnotationPresent(Anonymous.class))
|
||||||
|
{
|
||||||
|
RequestMapping baseMapping = beanClass.getAnnotation(RequestMapping.class);
|
||||||
|
if (Objects.nonNull(baseMapping))
|
||||||
|
{
|
||||||
|
String[] baseUrl = baseMapping.value();
|
||||||
|
for (String url : baseUrl)
|
||||||
|
{
|
||||||
|
urls.add(prefix(url) + "/*");
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 处理方法级别的匿名访问注解
|
||||||
|
Method[] methods = beanClass.getDeclaredMethods();
|
||||||
|
for (Method method : methods)
|
||||||
|
{
|
||||||
|
if (method.isAnnotationPresent(Anonymous.class))
|
||||||
|
{
|
||||||
|
RequestMapping baseMapping = beanClass.getAnnotation(RequestMapping.class);
|
||||||
|
String[] baseUrl = {};
|
||||||
|
if (Objects.nonNull(baseMapping))
|
||||||
|
{
|
||||||
|
baseUrl = baseMapping.value();
|
||||||
|
}
|
||||||
|
if (method.isAnnotationPresent(RequestMapping.class))
|
||||||
|
{
|
||||||
|
RequestMapping requestMapping = method.getAnnotation(RequestMapping.class);
|
||||||
|
String[] uri = requestMapping.value();
|
||||||
|
urls.addAll(rebuildUrl(baseUrl, uri));
|
||||||
|
}
|
||||||
|
else if (method.isAnnotationPresent(GetMapping.class))
|
||||||
|
{
|
||||||
|
GetMapping requestMapping = method.getAnnotation(GetMapping.class);
|
||||||
|
String[] uri = requestMapping.value();
|
||||||
|
urls.addAll(rebuildUrl(baseUrl, uri));
|
||||||
|
}
|
||||||
|
else if (method.isAnnotationPresent(PostMapping.class))
|
||||||
|
{
|
||||||
|
PostMapping requestMapping = method.getAnnotation(PostMapping.class);
|
||||||
|
String[] uri = requestMapping.value();
|
||||||
|
urls.addAll(rebuildUrl(baseUrl, uri));
|
||||||
|
}
|
||||||
|
else if (method.isAnnotationPresent(PutMapping.class))
|
||||||
|
{
|
||||||
|
PutMapping requestMapping = method.getAnnotation(PutMapping.class);
|
||||||
|
String[] uri = requestMapping.value();
|
||||||
|
urls.addAll(rebuildUrl(baseUrl, uri));
|
||||||
|
}
|
||||||
|
else if (method.isAnnotationPresent(DeleteMapping.class))
|
||||||
|
{
|
||||||
|
DeleteMapping requestMapping = method.getAnnotation(DeleteMapping.class);
|
||||||
|
String[] uri = requestMapping.value();
|
||||||
|
urls.addAll(rebuildUrl(baseUrl, uri));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<String> rebuildUrl(String[] bases, String[] uris)
|
||||||
|
{
|
||||||
|
List<String> urls = new ArrayList<>();
|
||||||
|
for (String base : bases)
|
||||||
|
{
|
||||||
|
if (uris.length > 0)
|
||||||
|
{
|
||||||
|
for (String uri : uris)
|
||||||
|
{
|
||||||
|
urls.add(prefix(base) + prefix(uri));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
urls.add(prefix(base));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return urls;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String prefix(String seg)
|
||||||
|
{
|
||||||
|
return seg.startsWith("/") ? seg : "/" + seg;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setApplicationContext(ApplicationContext context) throws BeansException
|
||||||
|
{
|
||||||
|
this.applicationContext = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getUrls()
|
||||||
|
{
|
||||||
|
return urls;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUrls(List<String> urls)
|
||||||
|
{
|
||||||
|
this.urls = urls;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package com.ruoyi.framework.interceptor;
|
package com.ruoyi.framework.interceptor;
|
||||||
|
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.web.method.HandlerMethod;
|
import org.springframework.web.method.HandlerMethod;
|
||||||
import org.springframework.web.servlet.HandlerInterceptor;
|
import org.springframework.web.servlet.HandlerInterceptor;
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package com.ruoyi.framework.interceptor.impl;
|
|||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpSession;
|
import javax.servlet.http.HttpSession;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||||
import com.ruoyi.common.json.JSON;
|
import com.ruoyi.common.json.JSON;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import org.slf4j.Logger;
|
|||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import jakarta.annotation.PreDestroy;
|
import javax.annotation.PreDestroy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 确保应用退出时能关闭后台线程
|
* 确保应用退出时能关闭后台线程
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
package com.ruoyi.framework.shiro.service;
|
package com.ruoyi.framework.shiro.service;
|
||||||
|
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
import javax.annotation.PostConstruct;
|
||||||
import org.apache.shiro.cache.Cache;
|
import org.apache.shiro.cache.Cache;
|
||||||
import org.apache.shiro.cache.CacheManager;
|
import org.apache.shiro.cache.CacheManager;
|
||||||
|
import org.apache.shiro.crypto.hash.Md5Hash;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
@@ -12,10 +14,8 @@ import com.ruoyi.common.core.domain.entity.SysUser;
|
|||||||
import com.ruoyi.common.exception.user.UserPasswordNotMatchException;
|
import com.ruoyi.common.exception.user.UserPasswordNotMatchException;
|
||||||
import com.ruoyi.common.exception.user.UserPasswordRetryLimitExceedException;
|
import com.ruoyi.common.exception.user.UserPasswordRetryLimitExceedException;
|
||||||
import com.ruoyi.common.utils.MessageUtils;
|
import com.ruoyi.common.utils.MessageUtils;
|
||||||
import com.ruoyi.common.utils.security.Md5Utils;
|
|
||||||
import com.ruoyi.framework.manager.AsyncManager;
|
import com.ruoyi.framework.manager.AsyncManager;
|
||||||
import com.ruoyi.framework.manager.factory.AsyncFactory;
|
import com.ruoyi.framework.manager.factory.AsyncFactory;
|
||||||
import jakarta.annotation.PostConstruct;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登录密码方法
|
* 登录密码方法
|
||||||
@@ -80,6 +80,6 @@ public class SysPasswordService
|
|||||||
|
|
||||||
public String encryptPassword(String loginName, String password, String salt)
|
public String encryptPassword(String loginName, String password, String salt)
|
||||||
{
|
{
|
||||||
return Md5Utils.hash(loginName + password + salt);
|
return new Md5Hash(loginName + password + salt).toHex();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.ruoyi.framework.shiro.session;
|
package com.ruoyi.framework.shiro.session;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import org.apache.shiro.session.Session;
|
import org.apache.shiro.session.Session;
|
||||||
import org.apache.shiro.session.mgt.SessionContext;
|
import org.apache.shiro.session.mgt.SessionContext;
|
||||||
import org.apache.shiro.session.mgt.SessionFactory;
|
import org.apache.shiro.session.mgt.SessionFactory;
|
||||||
@@ -7,7 +8,6 @@ import org.apache.shiro.web.session.mgt.WebSessionContext;
|
|||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import com.ruoyi.common.utils.IpUtils;
|
import com.ruoyi.common.utils.IpUtils;
|
||||||
import com.ruoyi.common.utils.http.UserAgentUtils;
|
import com.ruoyi.common.utils.http.UserAgentUtils;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自定义sessionFactory会话
|
* 自定义sessionFactory会话
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import org.apache.shiro.web.mgt.WebSecurityManager;
|
|||||||
import org.apache.shiro.web.servlet.AbstractShiroFilter;
|
import org.apache.shiro.web.servlet.AbstractShiroFilter;
|
||||||
import org.apache.shiro.mgt.SecurityManager;
|
import org.apache.shiro.mgt.SecurityManager;
|
||||||
import org.springframework.beans.factory.BeanInitializationException;
|
import org.springframework.beans.factory.BeanInitializationException;
|
||||||
import jakarta.servlet.Filter;
|
import javax.servlet.Filter;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.ruoyi.framework.shiro.web.filter;
|
package com.ruoyi.framework.shiro.web.filter;
|
||||||
|
|
||||||
import jakarta.servlet.ServletRequest;
|
import javax.servlet.ServletRequest;
|
||||||
import jakarta.servlet.ServletResponse;
|
import javax.servlet.ServletResponse;
|
||||||
import org.apache.shiro.session.SessionException;
|
import org.apache.shiro.session.SessionException;
|
||||||
import org.apache.shiro.subject.Subject;
|
import org.apache.shiro.subject.Subject;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package com.ruoyi.framework.shiro.web.filter.captcha;
|
package com.ruoyi.framework.shiro.web.filter.captcha;
|
||||||
|
|
||||||
import jakarta.servlet.ServletRequest;
|
import javax.servlet.ServletRequest;
|
||||||
import jakarta.servlet.ServletResponse;
|
import javax.servlet.ServletResponse;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import org.apache.shiro.web.filter.AccessControlFilter;
|
import org.apache.shiro.web.filter.AccessControlFilter;
|
||||||
import com.google.code.kaptcha.Constants;
|
import com.google.code.kaptcha.Constants;
|
||||||
import com.ruoyi.common.constant.ShiroConstants;
|
import com.ruoyi.common.constant.ShiroConstants;
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.ruoyi.framework.shiro.web.filter.csrf;
|
package com.ruoyi.framework.shiro.web.filter.csrf;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import jakarta.servlet.ServletRequest;
|
import javax.servlet.ServletRequest;
|
||||||
import jakarta.servlet.ServletResponse;
|
import javax.servlet.ServletResponse;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import org.apache.shiro.web.filter.AccessControlFilter;
|
import org.apache.shiro.web.filter.AccessControlFilter;
|
||||||
import com.ruoyi.common.constant.ShiroConstants;
|
import com.ruoyi.common.constant.ShiroConstants;
|
||||||
import com.ruoyi.common.core.text.Convert;
|
import com.ruoyi.common.core.text.Convert;
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ import java.io.IOException;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.ArrayDeque;
|
import java.util.ArrayDeque;
|
||||||
import java.util.Deque;
|
import java.util.Deque;
|
||||||
import jakarta.servlet.ServletRequest;
|
import javax.servlet.ServletRequest;
|
||||||
import jakarta.servlet.ServletResponse;
|
import javax.servlet.ServletResponse;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import org.apache.shiro.cache.Cache;
|
import org.apache.shiro.cache.Cache;
|
||||||
import org.apache.shiro.cache.CacheManager;
|
import org.apache.shiro.cache.CacheManager;
|
||||||
import org.apache.shiro.session.Session;
|
import org.apache.shiro.session.Session;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package com.ruoyi.framework.shiro.web.filter.online;
|
package com.ruoyi.framework.shiro.web.filter.online;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import jakarta.servlet.ServletRequest;
|
import javax.servlet.ServletRequest;
|
||||||
import jakarta.servlet.ServletResponse;
|
import javax.servlet.ServletResponse;
|
||||||
import org.apache.shiro.session.Session;
|
import org.apache.shiro.session.Session;
|
||||||
import org.apache.shiro.subject.Subject;
|
import org.apache.shiro.subject.Subject;
|
||||||
import org.apache.shiro.web.filter.AccessControlFilter;
|
import org.apache.shiro.web.filter.AccessControlFilter;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.ruoyi.framework.shiro.web.filter.sync;
|
package com.ruoyi.framework.shiro.web.filter.sync;
|
||||||
|
|
||||||
import jakarta.servlet.ServletRequest;
|
import javax.servlet.ServletRequest;
|
||||||
import jakarta.servlet.ServletResponse;
|
import javax.servlet.ServletResponse;
|
||||||
import org.apache.shiro.web.filter.PathMatchingFilter;
|
import org.apache.shiro.web.filter.PathMatchingFilter;
|
||||||
import com.ruoyi.common.constant.ShiroConstants;
|
import com.ruoyi.common.constant.ShiroConstants;
|
||||||
import com.ruoyi.framework.shiro.session.OnlineSession;
|
import com.ruoyi.framework.shiro.session.OnlineSession;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.ruoyi.framework.web.exception;
|
package com.ruoyi.framework.web.exception;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import org.apache.shiro.authz.AuthorizationException;
|
import org.apache.shiro.authz.AuthorizationException;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
<!-- 阿里数据库连接池 -->
|
<!-- 阿里数据库连接池 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba</groupId>
|
<groupId>com.alibaba</groupId>
|
||||||
<artifactId>druid-spring-boot-3-starter</artifactId>
|
<artifactId>druid-spring-boot-starter</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import java.io.IOException;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.apache.shiro.authz.annotation.RequiresRoles;
|
import org.apache.shiro.authz.annotation.RequiresRoles;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package com.ruoyi.generator.domain;
|
package com.ruoyi.generator.domain;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import jakarta.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
import com.ruoyi.common.constant.GenConstants;
|
import com.ruoyi.common.constant.GenConstants;
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.ruoyi.generator.domain;
|
package com.ruoyi.generator.domain;
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,12 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.quartz-scheduler</groupId>
|
<groupId>org.quartz-scheduler</groupId>
|
||||||
<artifactId>quartz</artifactId>
|
<artifactId>quartz</artifactId>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>com.mchange</groupId>
|
||||||
|
<artifactId>c3p0</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 通用工具-->
|
<!-- 通用工具-->
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package com.ruoyi.quartz.domain;
|
|||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import jakarta.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.ruoyi.common.annotation.Excel;
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.ruoyi.quartz.service.impl;
|
package com.ruoyi.quartz.service.impl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import jakarta.annotation.PostConstruct;
|
import javax.annotation.PostConstruct;
|
||||||
import org.quartz.JobDataMap;
|
import org.quartz.JobDataMap;
|
||||||
import org.quartz.JobKey;
|
import org.quartz.JobKey;
|
||||||
import org.quartz.Scheduler;
|
import org.quartz.Scheduler;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.ruoyi.system.domain;
|
package com.ruoyi.system.domain;
|
||||||
|
|
||||||
import jakarta.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.ruoyi.common.annotation.Excel;
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.ruoyi.system.domain;
|
package com.ruoyi.system.domain;
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import jakarta.validation.constraints.Size;
|
import javax.validation.constraints.Size;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.ruoyi.system.domain;
|
package com.ruoyi.system.domain;
|
||||||
|
|
||||||
import jakarta.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.ruoyi.common.annotation.Excel;
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.ruoyi.system.service.impl;
|
package com.ruoyi.system.service.impl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import jakarta.annotation.PostConstruct;
|
import javax.annotation.PostConstruct;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.ruoyi.common.constant.Constants;
|
import com.ruoyi.common.constant.Constants;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import java.util.Comparator;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import jakarta.annotation.PostConstruct;
|
import javax.annotation.PostConstruct;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import java.util.ArrayList;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import jakarta.validation.ConstraintViolationException;
|
import javax.validation.ConstraintViolationException;
|
||||||
import jakarta.validation.Validator;
|
import javax.validation.Validator;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|||||||
Reference in New Issue
Block a user