Commit cee572f237cb293e4a9070ef458356bc6daa2105
1 parent
0d341f1a
若依 3.0
Showing
316 changed files
with
8753 additions
and
8360 deletions
Too many changes.
To preserve performance only 100 of 316 files are displayed.
ruoyi/.gitignore renamed to .gitignore
ruoyi/bin/clean.bat renamed to bin/clean.bat
ruoyi/bin/package.bat renamed to bin/package.bat
bin/run.bat
0 → 100644
| 1 | +@echo off | |
| 2 | +echo. | |
| 3 | +echo [ĞÅÏ¢] ÔËĞĞWeb¹¤³Ì¡£ | |
| 4 | +echo. | |
| 5 | + | |
| 6 | +cd %~dp0 | |
| 7 | +cd ../ruoyi-admin/target | |
| 8 | + | |
| 9 | +set JAVA_OPTS=-Xms256m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m | |
| 10 | + | |
| 11 | +java -jar %JAVA_OPTS% ruoyi-admin.jar | |
| 12 | + | |
| 13 | +cd bin | |
| 14 | +pause | |
| 0 | 15 | \ No newline at end of file | ... | ... |
doc/若依环境使用手册.docx
0 → 100644
No preview for this file type
ruoyi/pom.xml renamed to pom.xml
| 1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| 3 | - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| 2 | +<project xmlns="http://maven.apache.org/POM/4.0.0" | |
| 3 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| 4 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| 4 | 5 | <modelVersion>4.0.0</modelVersion> |
| 5 | - | |
| 6 | - <groupId>com.ruoyi</groupId> | |
| 7 | - <artifactId>ruoyi</artifactId> | |
| 8 | - <version>2.3.0</version> | |
| 9 | - <packaging>jar</packaging> | |
| 10 | - | |
| 11 | - <name>ruoyi</name> | |
| 12 | - <url>http://www.ruoyi.vip</url> | |
| 13 | - <description>若依管理系统</description> | |
| 14 | - | |
| 15 | - <parent> | |
| 16 | - <groupId>org.springframework.boot</groupId> | |
| 17 | - <artifactId>spring-boot-starter-parent</artifactId> | |
| 18 | - <version>2.1.1.RELEASE</version> | |
| 19 | - <relativePath /> | |
| 20 | - </parent> | |
| 21 | - | |
| 22 | - <properties> | |
| 23 | - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |
| 24 | - <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | |
| 25 | - <java.version>1.8</java.version> | |
| 26 | - <mybatis.spring.boot.starter.version>1.3.2</mybatis.spring.boot.starter.version> | |
| 27 | - <pagehelper.spring.boot.starter.version>1.2.5</pagehelper.spring.boot.starter.version> | |
| 28 | - <fastjson.version>1.2.70</fastjson.version> | |
| 29 | - <druid.version>1.1.14</druid.version> | |
| 30 | - <commons.io.version>2.5</commons.io.version> | |
| 31 | - <commons.fileupload.version>1.3.3</commons.fileupload.version> | |
| 32 | - <bitwalker.version>1.19</bitwalker.version> | |
| 33 | - <jwt.version>0.9.0</jwt.version> | |
| 34 | - <swagger.version>2.9.2</swagger.version> | |
| 35 | - <poi.version>3.17</poi.version> | |
| 36 | - <oshi.version>3.9.1</oshi.version> | |
| 37 | - <velocity.version>1.7</velocity.version> | |
| 38 | - </properties> | |
| 39 | - | |
| 40 | - <dependencies> | |
| 41 | - | |
| 42 | - <!-- SpringBoot 核心包 --> | |
| 43 | - <dependency> | |
| 44 | - <groupId>org.springframework.boot</groupId> | |
| 45 | - <artifactId>spring-boot-starter</artifactId> | |
| 46 | - </dependency> | |
| 47 | - | |
| 48 | - <!-- SpringBoot 测试 --> | |
| 49 | - <dependency> | |
| 50 | - <groupId>org.springframework.boot</groupId> | |
| 51 | - <artifactId>spring-boot-starter-test</artifactId> | |
| 52 | - <scope>test</scope> | |
| 53 | - </dependency> | |
| 54 | - | |
| 55 | - <!-- SpringBoot 拦截器 --> | |
| 56 | - <dependency> | |
| 57 | - <groupId>org.springframework.boot</groupId> | |
| 58 | - <artifactId>spring-boot-starter-aop</artifactId> | |
| 59 | - </dependency> | |
| 60 | - | |
| 61 | - <!-- SpringBoot Web容器 --> | |
| 62 | - <dependency> | |
| 63 | - <groupId>org.springframework.boot</groupId> | |
| 64 | - <artifactId>spring-boot-starter-web</artifactId> | |
| 65 | - </dependency> | |
| 66 | - | |
| 67 | - <!-- spring-boot-devtools --> | |
| 68 | - <dependency> | |
| 69 | - <groupId>org.springframework.boot</groupId> | |
| 70 | - <artifactId>spring-boot-devtools</artifactId> | |
| 71 | - <optional>true</optional> <!-- 表示依赖不会传递 --> | |
| 72 | - </dependency> | |
| 73 | - | |
| 74 | - <!-- spring security 安全认证 --> | |
| 75 | - <dependency> | |
| 76 | - <groupId>org.springframework.boot</groupId> | |
| 77 | - <artifactId>spring-boot-starter-security</artifactId> | |
| 78 | - </dependency> | |
| 79 | - | |
| 80 | - <!-- redis 缓存操作 --> | |
| 81 | - <dependency> | |
| 82 | - <groupId>org.springframework.boot</groupId> | |
| 83 | - <artifactId>spring-boot-starter-data-redis</artifactId> | |
| 84 | - </dependency> | |
| 85 | - | |
| 86 | - <!-- pool 对象池 --> | |
| 87 | - <dependency> | |
| 88 | - <groupId>org.apache.commons</groupId> | |
| 89 | - <artifactId>commons-pool2</artifactId> | |
| 90 | - </dependency> | |
| 91 | - | |
| 92 | - <!-- Mysql驱动包 --> | |
| 93 | - <dependency> | |
| 94 | - <groupId>mysql</groupId> | |
| 95 | - <artifactId>mysql-connector-java</artifactId> | |
| 96 | - <scope>runtime</scope> | |
| 97 | - </dependency> | |
| 98 | - | |
| 99 | - <!-- SpringBoot集成mybatis框架 --> | |
| 100 | - <dependency> | |
| 101 | - <groupId>org.mybatis.spring.boot</groupId> | |
| 102 | - <artifactId>mybatis-spring-boot-starter</artifactId> | |
| 103 | - <version>${mybatis.spring.boot.starter.version}</version> | |
| 104 | - </dependency> | |
| 105 | - | |
| 106 | - <!-- pagehelper 分页插件 --> | |
| 107 | - <dependency> | |
| 108 | - <groupId>com.github.pagehelper</groupId> | |
| 109 | - <artifactId>pagehelper-spring-boot-starter</artifactId> | |
| 110 | - <version>${pagehelper.spring.boot.starter.version}</version> | |
| 111 | - </dependency> | |
| 112 | - | |
| 113 | - <!--阿里数据库连接池 --> | |
| 114 | - <dependency> | |
| 115 | - <groupId>com.alibaba</groupId> | |
| 116 | - <artifactId>druid-spring-boot-starter</artifactId> | |
| 117 | - <version>${druid.version}</version> | |
| 118 | - </dependency> | |
| 119 | - | |
| 120 | - <!--常用工具类 --> | |
| 121 | - <dependency> | |
| 122 | - <groupId>org.apache.commons</groupId> | |
| 123 | - <artifactId>commons-lang3</artifactId> | |
| 124 | - </dependency> | |
| 125 | - | |
| 126 | - <!--io常用工具类 --> | |
| 127 | - <dependency> | |
| 128 | - <groupId>commons-io</groupId> | |
| 129 | - <artifactId>commons-io</artifactId> | |
| 130 | - <version>${commons.io.version}</version> | |
| 131 | - </dependency> | |
| 132 | - | |
| 133 | - <!--文件上传工具类 --> | |
| 134 | - <dependency> | |
| 135 | - <groupId>commons-fileupload</groupId> | |
| 136 | - <artifactId>commons-fileupload</artifactId> | |
| 137 | - <version>${commons.fileupload.version}</version> | |
| 138 | - </dependency> | |
| 139 | - | |
| 140 | - <!-- 解析客户端操作系统、浏览器等 --> | |
| 141 | - <dependency> | |
| 142 | - <groupId>eu.bitwalker</groupId> | |
| 143 | - <artifactId>UserAgentUtils</artifactId> | |
| 144 | - <version>${bitwalker.version}</version> | |
| 145 | - </dependency> | |
| 146 | - | |
| 147 | - <!-- 阿里JSON解析器 --> | |
| 148 | - <dependency> | |
| 149 | - <groupId>com.alibaba</groupId> | |
| 150 | - <artifactId>fastjson</artifactId> | |
| 151 | - <version>${fastjson.version}</version> | |
| 152 | - </dependency> | |
| 153 | - | |
| 154 | - <!--Spring框架基本的核心工具--> | |
| 155 | - <dependency> | |
| 156 | - <groupId>org.springframework</groupId> | |
| 157 | - <artifactId>spring-context-support</artifactId> | |
| 158 | - </dependency> | |
| 159 | - | |
| 160 | - <!--Token生成与解析--> | |
| 161 | - <dependency> | |
| 162 | - <groupId>io.jsonwebtoken</groupId> | |
| 163 | - <artifactId>jjwt</artifactId> | |
| 164 | - <version>${jwt.version}</version> | |
| 165 | - </dependency> | |
| 166 | - | |
| 167 | - <!-- swagger2--> | |
| 168 | - <dependency> | |
| 169 | - <groupId>io.springfox</groupId> | |
| 170 | - <artifactId>springfox-swagger2</artifactId> | |
| 171 | - <version>${swagger.version}</version> | |
| 172 | - <exclusions> | |
| 173 | - <exclusion> | |
| 174 | - <groupId>io.swagger</groupId> | |
| 175 | - <artifactId>swagger-annotations</artifactId> | |
| 176 | - </exclusion> | |
| 177 | - <exclusion> | |
| 178 | - <groupId>io.swagger</groupId> | |
| 179 | - <artifactId>swagger-models</artifactId> | |
| 180 | - </exclusion> | |
| 181 | - </exclusions> | |
| 182 | - </dependency> | |
| 183 | - | |
| 184 | - <!--防止进入swagger页面报类型转换错误,排除2.9.2中的引用,手动增加1.5.21版本--> | |
| 185 | - <dependency> | |
| 186 | - <groupId>io.swagger</groupId> | |
| 187 | - <artifactId>swagger-annotations</artifactId> | |
| 188 | - <version>1.5.21</version> | |
| 189 | - </dependency> | |
| 190 | - | |
| 191 | - <dependency> | |
| 192 | - <groupId>io.swagger</groupId> | |
| 193 | - <artifactId>swagger-models</artifactId> | |
| 194 | - <version>1.5.21</version> | |
| 195 | - </dependency> | |
| 6 | + | |
| 7 | + <groupId>com.ruoyi</groupId> | |
| 8 | + <artifactId>ruoyi</artifactId> | |
| 9 | + <version>3.0.0</version> | |
| 10 | + | |
| 11 | + <name>ruoyi</name> | |
| 12 | + <url>http://www.ruoyi.vip</url> | |
| 13 | + <description>若依管理系统</description> | |
| 14 | + | |
| 15 | + <properties> | |
| 16 | + <ruoyi.version>3.0.0</ruoyi.version> | |
| 17 | + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |
| 18 | + <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | |
| 19 | + <java.version>1.8</java.version> | |
| 20 | + <mybatis.boot.version>1.3.2</mybatis.boot.version> | |
| 21 | + <druid.version>1.1.14</druid.version> | |
| 22 | + <bitwalker.version>1.19</bitwalker.version> | |
| 23 | + <swagger.version>2.9.2</swagger.version> | |
| 24 | + <pagehelper.boot.version>1.2.5</pagehelper.boot.version> | |
| 25 | + <fastjson.version>1.2.70</fastjson.version> | |
| 26 | + <oshi.version>3.9.1</oshi.version> | |
| 27 | + <commons.io.version>2.5</commons.io.version> | |
| 28 | + <commons.fileupload.version>1.3.3</commons.fileupload.version> | |
| 29 | + <poi.version>3.17</poi.version> | |
| 30 | + <velocity.version>1.7</velocity.version> | |
| 31 | + <jwt.version>0.9.0</jwt.version> | |
| 32 | + </properties> | |
| 33 | + | |
| 34 | + <!-- 依赖声明 --> | |
| 35 | + <dependencyManagement> | |
| 36 | + <dependencies> | |
| 196 | 37 | |
| 197 | - <!-- swagger2-UI--> | |
| 198 | - <dependency> | |
| 199 | - <groupId>io.springfox</groupId> | |
| 200 | - <artifactId>springfox-swagger-ui</artifactId> | |
| 201 | - <version>${swagger.version}</version> | |
| 202 | - </dependency> | |
| 203 | - | |
| 204 | - <!-- 获取系统信息 --> | |
| 205 | - <dependency> | |
| 206 | - <groupId>com.github.oshi</groupId> | |
| 207 | - <artifactId>oshi-core</artifactId> | |
| 208 | - <version>${oshi.version}</version> | |
| 209 | - </dependency> | |
| 210 | - | |
| 211 | - <dependency> | |
| 212 | - <groupId>net.java.dev.jna</groupId> | |
| 213 | - <artifactId>jna</artifactId> | |
| 214 | - </dependency> | |
| 215 | - | |
| 216 | - <dependency> | |
| 217 | - <groupId>net.java.dev.jna</groupId> | |
| 218 | - <artifactId>jna-platform</artifactId> | |
| 219 | - </dependency> | |
| 220 | - | |
| 221 | - <!-- excel工具 --> | |
| 222 | - <dependency> | |
| 223 | - <groupId>org.apache.poi</groupId> | |
| 224 | - <artifactId>poi-ooxml</artifactId> | |
| 225 | - <version>${poi.version}</version> | |
| 226 | - </dependency> | |
| 227 | - | |
| 228 | - <!--velocity代码生成使用模板 --> | |
| 229 | - <dependency> | |
| 230 | - <groupId>org.apache.velocity</groupId> | |
| 231 | - <artifactId>velocity</artifactId> | |
| 232 | - <version>${velocity.version}</version> | |
| 233 | - </dependency> | |
| 234 | - | |
| 235 | - <!-- 定时任务 --> | |
| 236 | - <dependency> | |
| 237 | - <groupId>org.quartz-scheduler</groupId> | |
| 238 | - <artifactId>quartz</artifactId> | |
| 239 | - <exclusions> | |
| 240 | - <exclusion> | |
| 241 | - <groupId>com.mchange</groupId> | |
| 242 | - <artifactId>c3p0</artifactId> | |
| 243 | - </exclusion> | |
| 244 | - </exclusions> | |
| 245 | - </dependency> | |
| 246 | - | |
| 247 | - </dependencies> | |
| 248 | - | |
| 249 | - <build> | |
| 250 | - <finalName>${project.artifactId}</finalName> | |
| 251 | - <plugins> | |
| 252 | - <plugin> | |
| 253 | - <groupId>org.springframework.boot</groupId> | |
| 254 | - <artifactId>spring-boot-maven-plugin</artifactId> | |
| 255 | - <configuration> | |
| 256 | - <fork>true</fork> <!-- 如果没有该配置,devtools不会生效 --> | |
| 257 | - </configuration> | |
| 258 | - </plugin> | |
| 259 | - </plugins> | |
| 260 | - </build> | |
| 261 | - | |
| 262 | - <repositories> | |
| 263 | - <repository> | |
| 264 | - <id>public</id> | |
| 265 | - <name>aliyun nexus</name> | |
| 266 | - <url>http://maven.aliyun.com/nexus/content/groups/public/</url> | |
| 267 | - <releases> | |
| 268 | - <enabled>true</enabled> | |
| 269 | - </releases> | |
| 270 | - </repository> | |
| 271 | - </repositories> | |
| 272 | - | |
| 273 | - <pluginRepositories> | |
| 274 | - <pluginRepository> | |
| 275 | - <id>public</id> | |
| 276 | - <name>aliyun nexus</name> | |
| 277 | - <url>http://maven.aliyun.com/nexus/content/groups/public/</url> | |
| 278 | - <releases> | |
| 279 | - <enabled>true</enabled> | |
| 280 | - </releases> | |
| 281 | - <snapshots> | |
| 282 | - <enabled>false</enabled> | |
| 283 | - </snapshots> | |
| 284 | - </pluginRepository> | |
| 285 | - </pluginRepositories> | |
| 38 | + <!-- SpringBoot的依赖配置--> | |
| 39 | + <dependency> | |
| 40 | + <groupId>org.springframework.boot</groupId> | |
| 41 | + <artifactId>spring-boot-dependencies</artifactId> | |
| 42 | + <version>2.1.1.RELEASE</version> | |
| 43 | + <type>pom</type> | |
| 44 | + <scope>import</scope> | |
| 45 | + </dependency> | |
| 46 | + | |
| 47 | + <!--阿里数据库连接池 --> | |
| 48 | + <dependency> | |
| 49 | + <groupId>com.alibaba</groupId> | |
| 50 | + <artifactId>druid-spring-boot-starter</artifactId> | |
| 51 | + <version>${druid.version}</version> | |
| 52 | + </dependency> | |
| 53 | + | |
| 54 | + <!-- 解析客户端操作系统、浏览器等 --> | |
| 55 | + <dependency> | |
| 56 | + <groupId>eu.bitwalker</groupId> | |
| 57 | + <artifactId>UserAgentUtils</artifactId> | |
| 58 | + <version>${bitwalker.version}</version> | |
| 59 | + </dependency> | |
| 60 | + | |
| 61 | + <!-- pagehelper 分页插件 --> | |
| 62 | + <dependency> | |
| 63 | + <groupId>com.github.pagehelper</groupId> | |
| 64 | + <artifactId>pagehelper-spring-boot-starter</artifactId> | |
| 65 | + <version>${pagehelper.boot.version}</version> | |
| 66 | + </dependency> | |
| 67 | + | |
| 68 | + <!-- 获取系统信息 --> | |
| 69 | + <dependency> | |
| 70 | + <groupId>com.github.oshi</groupId> | |
| 71 | + <artifactId>oshi-core</artifactId> | |
| 72 | + <version>${oshi.version}</version> | |
| 73 | + </dependency> | |
| 74 | + | |
| 75 | + <!-- swagger2--> | |
| 76 | + <dependency> | |
| 77 | + <groupId>io.springfox</groupId> | |
| 78 | + <artifactId>springfox-swagger2</artifactId> | |
| 79 | + <version>${swagger.version}</version> | |
| 80 | + <exclusions> | |
| 81 | + <exclusion> | |
| 82 | + <groupId>io.swagger</groupId> | |
| 83 | + <artifactId>swagger-annotations</artifactId> | |
| 84 | + </exclusion> | |
| 85 | + <exclusion> | |
| 86 | + <groupId>io.swagger</groupId> | |
| 87 | + <artifactId>swagger-models</artifactId> | |
| 88 | + </exclusion> | |
| 89 | + </exclusions> | |
| 90 | + </dependency> | |
| 91 | + | |
| 92 | + <!-- swagger2-UI--> | |
| 93 | + <dependency> | |
| 94 | + <groupId>io.springfox</groupId> | |
| 95 | + <artifactId>springfox-swagger-ui</artifactId> | |
| 96 | + <version>${swagger.version}</version> | |
| 97 | + </dependency> | |
| 98 | + | |
| 99 | + <!--io常用工具类 --> | |
| 100 | + <dependency> | |
| 101 | + <groupId>commons-io</groupId> | |
| 102 | + <artifactId>commons-io</artifactId> | |
| 103 | + <version>${commons.io.version}</version> | |
| 104 | + </dependency> | |
| 105 | + | |
| 106 | + <!--文件上传工具类 --> | |
| 107 | + <dependency> | |
| 108 | + <groupId>commons-fileupload</groupId> | |
| 109 | + <artifactId>commons-fileupload</artifactId> | |
| 110 | + <version>${commons.fileupload.version}</version> | |
| 111 | + </dependency> | |
| 112 | + | |
| 113 | + <!-- excel工具 --> | |
| 114 | + <dependency> | |
| 115 | + <groupId>org.apache.poi</groupId> | |
| 116 | + <artifactId>poi-ooxml</artifactId> | |
| 117 | + <version>${poi.version}</version> | |
| 118 | + </dependency> | |
| 119 | + | |
| 120 | + <!--velocity代码生成使用模板 --> | |
| 121 | + <dependency> | |
| 122 | + <groupId>org.apache.velocity</groupId> | |
| 123 | + <artifactId>velocity</artifactId> | |
| 124 | + <version>${velocity.version}</version> | |
| 125 | + </dependency> | |
| 126 | + | |
| 127 | + <!-- 阿里JSON解析器 --> | |
| 128 | + <dependency> | |
| 129 | + <groupId>com.alibaba</groupId> | |
| 130 | + <artifactId>fastjson</artifactId> | |
| 131 | + <version>${fastjson.version}</version> | |
| 132 | + </dependency> | |
| 133 | + | |
| 134 | + <!--Token生成与解析--> | |
| 135 | + <dependency> | |
| 136 | + <groupId>io.jsonwebtoken</groupId> | |
| 137 | + <artifactId>jjwt</artifactId> | |
| 138 | + <version>${jwt.version}</version> | |
| 139 | + </dependency> | |
| 140 | + | |
| 141 | + <!-- 定时任务--> | |
| 142 | + <dependency> | |
| 143 | + <groupId>com.ruoyi</groupId> | |
| 144 | + <artifactId>ruoyi-quartz</artifactId> | |
| 145 | + <version>${ruoyi.version}</version> | |
| 146 | + </dependency> | |
| 147 | + | |
| 148 | + <!-- 代码生成--> | |
| 149 | + <dependency> | |
| 150 | + <groupId>com.ruoyi</groupId> | |
| 151 | + <artifactId>ruoyi-generator</artifactId> | |
| 152 | + <version>${ruoyi.version}</version> | |
| 153 | + </dependency> | |
| 154 | + | |
| 155 | + <!-- 核心模块--> | |
| 156 | + <dependency> | |
| 157 | + <groupId>com.ruoyi</groupId> | |
| 158 | + <artifactId>ruoyi-framework</artifactId> | |
| 159 | + <version>${ruoyi.version}</version> | |
| 160 | + </dependency> | |
| 161 | + | |
| 162 | + <!-- 系统模块--> | |
| 163 | + <dependency> | |
| 164 | + <groupId>com.ruoyi</groupId> | |
| 165 | + <artifactId>ruoyi-system</artifactId> | |
| 166 | + <version>${ruoyi.version}</version> | |
| 167 | + </dependency> | |
| 168 | + | |
| 169 | + <!-- 通用工具--> | |
| 170 | + <dependency> | |
| 171 | + <groupId>com.ruoyi</groupId> | |
| 172 | + <artifactId>ruoyi-common</artifactId> | |
| 173 | + <version>${ruoyi.version}</version> | |
| 174 | + </dependency> | |
| 175 | + | |
| 176 | + </dependencies> | |
| 177 | + </dependencyManagement> | |
| 178 | + | |
| 179 | + <modules> | |
| 180 | + <module>ruoyi-admin</module> | |
| 181 | + <module>ruoyi-framework</module> | |
| 182 | + <module>ruoyi-system</module> | |
| 183 | + <module>ruoyi-quartz</module> | |
| 184 | + <module>ruoyi-generator</module> | |
| 185 | + <module>ruoyi-common</module> | |
| 186 | + </modules> | |
| 187 | + <packaging>pom</packaging> | |
| 188 | + | |
| 189 | + | |
| 190 | + <dependencies> | |
| 191 | + | |
| 192 | + </dependencies> | |
| 193 | + | |
| 194 | + <build> | |
| 195 | + <plugins> | |
| 196 | + <plugin> | |
| 197 | + <groupId>org.apache.maven.plugins</groupId> | |
| 198 | + <artifactId>maven-compiler-plugin</artifactId> | |
| 199 | + <version>3.1</version> | |
| 200 | + <configuration> | |
| 201 | + <source>${java.version}</source> | |
| 202 | + <target>${java.version}</target> | |
| 203 | + <encoding>${project.build.sourceEncoding}</encoding> | |
| 204 | + </configuration> | |
| 205 | + </plugin> | |
| 206 | + </plugins> | |
| 207 | + </build> | |
| 208 | + | |
| 209 | + <repositories> | |
| 210 | + <repository> | |
| 211 | + <id>public</id> | |
| 212 | + <name>aliyun nexus</name> | |
| 213 | + <url>http://maven.aliyun.com/nexus/content/groups/public/</url> | |
| 214 | + <releases> | |
| 215 | + <enabled>true</enabled> | |
| 216 | + </releases> | |
| 217 | + </repository> | |
| 218 | + </repositories> | |
| 219 | + | |
| 220 | + <pluginRepositories> | |
| 221 | + <pluginRepository> | |
| 222 | + <id>public</id> | |
| 223 | + <name>aliyun nexus</name> | |
| 224 | + <url>http://maven.aliyun.com/nexus/content/groups/public/</url> | |
| 225 | + <releases> | |
| 226 | + <enabled>true</enabled> | |
| 227 | + </releases> | |
| 228 | + <snapshots> | |
| 229 | + <enabled>false</enabled> | |
| 230 | + </snapshots> | |
| 231 | + </pluginRepository> | |
| 232 | + </pluginRepositories> | |
| 286 | 233 | |
| 287 | 234 | </project> |
| 288 | 235 | \ No newline at end of file | ... | ... |
ruoyi-admin/pom.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<project xmlns="http://maven.apache.org/POM/4.0.0" | |
| 3 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| 4 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| 5 | + <parent> | |
| 6 | + <artifactId>ruoyi</artifactId> | |
| 7 | + <groupId>com.ruoyi</groupId> | |
| 8 | + <version>3.0.0</version> | |
| 9 | + </parent> | |
| 10 | + <modelVersion>4.0.0</modelVersion> | |
| 11 | + <packaging>jar</packaging> | |
| 12 | + <artifactId>ruoyi-admin</artifactId> | |
| 13 | + | |
| 14 | + <description> | |
| 15 | + web服务入口 | |
| 16 | + </description> | |
| 17 | + | |
| 18 | + <dependencies> | |
| 19 | + | |
| 20 | + <!-- spring-boot-devtools --> | |
| 21 | + <dependency> | |
| 22 | + <groupId>org.springframework.boot</groupId> | |
| 23 | + <artifactId>spring-boot-devtools</artifactId> | |
| 24 | + <optional>true</optional> <!-- 表示依赖不会传递 --> | |
| 25 | + </dependency> | |
| 26 | + | |
| 27 | + <!-- swagger2--> | |
| 28 | + <dependency> | |
| 29 | + <groupId>io.springfox</groupId> | |
| 30 | + <artifactId>springfox-swagger2</artifactId> | |
| 31 | + </dependency> | |
| 32 | + | |
| 33 | + <!--防止进入swagger页面报类型转换错误,排除2.9.2中的引用,手动增加1.5.21版本--> | |
| 34 | + <dependency> | |
| 35 | + <groupId>io.swagger</groupId> | |
| 36 | + <artifactId>swagger-annotations</artifactId> | |
| 37 | + <version>1.5.21</version> | |
| 38 | + </dependency> | |
| 39 | + | |
| 40 | + <dependency> | |
| 41 | + <groupId>io.swagger</groupId> | |
| 42 | + <artifactId>swagger-models</artifactId> | |
| 43 | + <version>1.5.21</version> | |
| 44 | + </dependency> | |
| 45 | + | |
| 46 | + <!-- swagger2-UI--> | |
| 47 | + <dependency> | |
| 48 | + <groupId>io.springfox</groupId> | |
| 49 | + <artifactId>springfox-swagger-ui</artifactId> | |
| 50 | + </dependency> | |
| 51 | + | |
| 52 | + <!-- Mysql驱动包 --> | |
| 53 | + <dependency> | |
| 54 | + <groupId>mysql</groupId> | |
| 55 | + <artifactId>mysql-connector-java</artifactId> | |
| 56 | + </dependency> | |
| 57 | + | |
| 58 | + <!-- 核心模块--> | |
| 59 | + <dependency> | |
| 60 | + <groupId>com.ruoyi</groupId> | |
| 61 | + <artifactId>ruoyi-framework</artifactId> | |
| 62 | + </dependency> | |
| 63 | + | |
| 64 | + <!-- 定时任务--> | |
| 65 | + <dependency> | |
| 66 | + <groupId>com.ruoyi</groupId> | |
| 67 | + <artifactId>ruoyi-quartz</artifactId> | |
| 68 | + </dependency> | |
| 69 | + | |
| 70 | + <!-- 代码生成--> | |
| 71 | + <dependency> | |
| 72 | + <groupId>com.ruoyi</groupId> | |
| 73 | + <artifactId>ruoyi-generator</artifactId> | |
| 74 | + </dependency> | |
| 75 | + | |
| 76 | + </dependencies> | |
| 77 | + | |
| 78 | + <build> | |
| 79 | + <plugins> | |
| 80 | + <plugin> | |
| 81 | + <groupId>org.springframework.boot</groupId> | |
| 82 | + <artifactId>spring-boot-maven-plugin</artifactId> | |
| 83 | + <version>2.1.1.RELEASE</version> | |
| 84 | + <configuration> | |
| 85 | + <fork>true</fork> <!-- 如果没有该配置,devtools不会生效 --> | |
| 86 | + </configuration> | |
| 87 | + <executions> | |
| 88 | + <execution> | |
| 89 | + <goals> | |
| 90 | + <goal>repackage</goal> | |
| 91 | + </goals> | |
| 92 | + </execution> | |
| 93 | + </executions> | |
| 94 | + </plugin> | |
| 95 | + <plugin> | |
| 96 | + <groupId>org.apache.maven.plugins</groupId> | |
| 97 | + <artifactId>maven-war-plugin</artifactId> | |
| 98 | + <version>3.0.0</version> | |
| 99 | + <configuration> | |
| 100 | + <failOnMissingWebXml>false</failOnMissingWebXml> | |
| 101 | + <warName>${project.artifactId}</warName> | |
| 102 | + </configuration> | |
| 103 | + </plugin> | |
| 104 | + </plugins> | |
| 105 | + <finalName>${project.artifactId}</finalName> | |
| 106 | + </build> | |
| 107 | + | |
| 108 | +</project> | |
| 0 | 109 | \ No newline at end of file | ... | ... |
ruoyi/src/main/java/com/ruoyi/RuoYiApplication.java renamed to ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java
ruoyi/src/main/java/com/ruoyi/RuoYiServletInitializer.java renamed to ruoyi-admin/src/main/java/com/ruoyi/RuoYiServletInitializer.java
ruoyi/src/main/java/com/ruoyi/project/common/CaptchaController.java renamed to ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CaptchaController.java
| 1 | -package com.ruoyi.project.common; | |
| 1 | +package com.ruoyi.web.controller.common; | |
| 2 | 2 | |
| 3 | 3 | import java.io.ByteArrayOutputStream; |
| 4 | 4 | import java.io.IOException; |
| ... | ... | @@ -8,11 +8,11 @@ import org.springframework.beans.factory.annotation.Autowired; |
| 8 | 8 | import org.springframework.web.bind.annotation.GetMapping; |
| 9 | 9 | import org.springframework.web.bind.annotation.RestController; |
| 10 | 10 | import com.ruoyi.common.constant.Constants; |
| 11 | -import com.ruoyi.common.utils.IdUtils; | |
| 11 | +import com.ruoyi.common.core.domain.AjaxResult; | |
| 12 | +import com.ruoyi.common.core.redis.RedisCache; | |
| 12 | 13 | import com.ruoyi.common.utils.VerifyCodeUtils; |
| 13 | 14 | import com.ruoyi.common.utils.sign.Base64; |
| 14 | -import com.ruoyi.framework.redis.RedisCache; | |
| 15 | -import com.ruoyi.framework.web.domain.AjaxResult; | |
| 15 | +import com.ruoyi.common.utils.uuid.IdUtils; | |
| 16 | 16 | |
| 17 | 17 | /** |
| 18 | 18 | * 验证码操作处理 | ... | ... |
ruoyi/src/main/java/com/ruoyi/project/common/CommonController.java renamed to ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
| 1 | -package com.ruoyi.project.common; | |
| 1 | +package com.ruoyi.web.controller.common; | |
| 2 | 2 | |
| 3 | 3 | import javax.servlet.http.HttpServletRequest; |
| 4 | 4 | import javax.servlet.http.HttpServletResponse; |
| ... | ... | @@ -9,13 +9,13 @@ import org.springframework.web.bind.annotation.GetMapping; |
| 9 | 9 | import org.springframework.web.bind.annotation.PostMapping; |
| 10 | 10 | import org.springframework.web.bind.annotation.RestController; |
| 11 | 11 | import org.springframework.web.multipart.MultipartFile; |
| 12 | +import com.ruoyi.common.config.RuoYiConfig; | |
| 12 | 13 | import com.ruoyi.common.constant.Constants; |
| 14 | +import com.ruoyi.common.core.domain.AjaxResult; | |
| 13 | 15 | import com.ruoyi.common.utils.StringUtils; |
| 14 | 16 | import com.ruoyi.common.utils.file.FileUploadUtils; |
| 15 | 17 | import com.ruoyi.common.utils.file.FileUtils; |
| 16 | -import com.ruoyi.framework.config.RuoYiConfig; | |
| 17 | 18 | import com.ruoyi.framework.config.ServerConfig; |
| 18 | -import com.ruoyi.framework.web.domain.AjaxResult; | |
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | 21 | * 通用请求处理 | ... | ... |
ruoyi/src/main/java/com/ruoyi/project/monitor/controller/ServerController.java renamed to ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/ServerController.java
| 1 | -package com.ruoyi.project.monitor.controller; | |
| 1 | +package com.ruoyi.web.controller.monitor; | |
| 2 | 2 | |
| 3 | 3 | import org.springframework.security.access.prepost.PreAuthorize; |
| 4 | 4 | import org.springframework.web.bind.annotation.GetMapping; |
| 5 | 5 | import org.springframework.web.bind.annotation.RequestMapping; |
| 6 | 6 | import org.springframework.web.bind.annotation.RestController; |
| 7 | -import com.ruoyi.framework.web.controller.BaseController; | |
| 8 | -import com.ruoyi.framework.web.domain.AjaxResult; | |
| 7 | +import com.ruoyi.common.core.controller.BaseController; | |
| 8 | +import com.ruoyi.common.core.domain.AjaxResult; | |
| 9 | 9 | import com.ruoyi.framework.web.domain.Server; |
| 10 | 10 | |
| 11 | 11 | /** | ... | ... |
ruoyi/src/main/java/com/ruoyi/project/monitor/controller/SysLogininforController.java renamed to ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysLogininforController.java
| 1 | -package com.ruoyi.project.monitor.controller; | |
| 1 | +package com.ruoyi.web.controller.monitor; | |
| 2 | 2 | |
| 3 | 3 | import java.util.List; |
| 4 | 4 | import org.springframework.beans.factory.annotation.Autowired; |
| ... | ... | @@ -8,14 +8,14 @@ import org.springframework.web.bind.annotation.GetMapping; |
| 8 | 8 | import org.springframework.web.bind.annotation.PathVariable; |
| 9 | 9 | import org.springframework.web.bind.annotation.RequestMapping; |
| 10 | 10 | import org.springframework.web.bind.annotation.RestController; |
| 11 | +import com.ruoyi.common.annotation.Log; | |
| 12 | +import com.ruoyi.common.core.controller.BaseController; | |
| 13 | +import com.ruoyi.common.core.domain.AjaxResult; | |
| 14 | +import com.ruoyi.common.core.page.TableDataInfo; | |
| 15 | +import com.ruoyi.common.enums.BusinessType; | |
| 11 | 16 | import com.ruoyi.common.utils.poi.ExcelUtil; |
| 12 | -import com.ruoyi.framework.aspectj.lang.annotation.Log; | |
| 13 | -import com.ruoyi.framework.aspectj.lang.enums.BusinessType; | |
| 14 | -import com.ruoyi.framework.web.controller.BaseController; | |
| 15 | -import com.ruoyi.framework.web.domain.AjaxResult; | |
| 16 | -import com.ruoyi.framework.web.page.TableDataInfo; | |
| 17 | -import com.ruoyi.project.monitor.domain.SysLogininfor; | |
| 18 | -import com.ruoyi.project.monitor.service.ISysLogininforService; | |
| 17 | +import com.ruoyi.system.domain.SysLogininfor; | |
| 18 | +import com.ruoyi.system.service.ISysLogininforService; | |
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | 21 | * 系统访问记录 | ... | ... |
ruoyi/src/main/java/com/ruoyi/project/monitor/controller/SysOperlogController.java renamed to ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysOperlogController.java
| 1 | -package com.ruoyi.project.monitor.controller; | |
| 1 | +package com.ruoyi.web.controller.monitor; | |
| 2 | 2 | |
| 3 | 3 | import java.util.List; |
| 4 | 4 | import org.springframework.beans.factory.annotation.Autowired; |
| ... | ... | @@ -8,14 +8,14 @@ import org.springframework.web.bind.annotation.GetMapping; |
| 8 | 8 | import org.springframework.web.bind.annotation.PathVariable; |
| 9 | 9 | import org.springframework.web.bind.annotation.RequestMapping; |
| 10 | 10 | import org.springframework.web.bind.annotation.RestController; |
| 11 | +import com.ruoyi.common.annotation.Log; | |
| 12 | +import com.ruoyi.common.core.controller.BaseController; | |
| 13 | +import com.ruoyi.common.core.domain.AjaxResult; | |
| 14 | +import com.ruoyi.common.core.page.TableDataInfo; | |
| 15 | +import com.ruoyi.common.enums.BusinessType; | |
| 11 | 16 | import com.ruoyi.common.utils.poi.ExcelUtil; |
| 12 | -import com.ruoyi.framework.aspectj.lang.annotation.Log; | |
| 13 | -import com.ruoyi.framework.aspectj.lang.enums.BusinessType; | |
| 14 | -import com.ruoyi.framework.web.controller.BaseController; | |
| 15 | -import com.ruoyi.framework.web.domain.AjaxResult; | |
| 16 | -import com.ruoyi.framework.web.page.TableDataInfo; | |
| 17 | -import com.ruoyi.project.monitor.domain.SysOperLog; | |
| 18 | -import com.ruoyi.project.monitor.service.ISysOperLogService; | |
| 17 | +import com.ruoyi.system.domain.SysOperLog; | |
| 18 | +import com.ruoyi.system.service.ISysOperLogService; | |
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | 21 | * 操作日志记录 | ... | ... |
ruoyi/src/main/java/com/ruoyi/project/monitor/controller/SysUserOnlineController.java renamed to ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysUserOnlineController.java
| 1 | -package com.ruoyi.project.monitor.controller; | |
| 1 | +package com.ruoyi.web.controller.monitor; | |
| 2 | 2 | |
| 3 | 3 | import java.util.ArrayList; |
| 4 | 4 | import java.util.Collection; |
| ... | ... | @@ -11,17 +11,17 @@ import org.springframework.web.bind.annotation.GetMapping; |
| 11 | 11 | import org.springframework.web.bind.annotation.PathVariable; |
| 12 | 12 | import org.springframework.web.bind.annotation.RequestMapping; |
| 13 | 13 | import org.springframework.web.bind.annotation.RestController; |
| 14 | +import com.ruoyi.common.annotation.Log; | |
| 14 | 15 | import com.ruoyi.common.constant.Constants; |
| 16 | +import com.ruoyi.common.core.controller.BaseController; | |
| 17 | +import com.ruoyi.common.core.domain.AjaxResult; | |
| 18 | +import com.ruoyi.common.core.domain.model.LoginUser; | |
| 19 | +import com.ruoyi.common.core.page.TableDataInfo; | |
| 20 | +import com.ruoyi.common.core.redis.RedisCache; | |
| 21 | +import com.ruoyi.common.enums.BusinessType; | |
| 15 | 22 | import com.ruoyi.common.utils.StringUtils; |
| 16 | -import com.ruoyi.framework.aspectj.lang.annotation.Log; | |
| 17 | -import com.ruoyi.framework.aspectj.lang.enums.BusinessType; | |
| 18 | -import com.ruoyi.framework.redis.RedisCache; | |
| 19 | -import com.ruoyi.framework.security.LoginUser; | |
| 20 | -import com.ruoyi.framework.web.controller.BaseController; | |
| 21 | -import com.ruoyi.framework.web.domain.AjaxResult; | |
| 22 | -import com.ruoyi.framework.web.page.TableDataInfo; | |
| 23 | -import com.ruoyi.project.monitor.domain.SysUserOnline; | |
| 24 | -import com.ruoyi.project.system.service.ISysUserOnlineService; | |
| 23 | +import com.ruoyi.system.domain.SysUserOnline; | |
| 24 | +import com.ruoyi.system.service.ISysUserOnlineService; | |
| 25 | 25 | |
| 26 | 26 | /** |
| 27 | 27 | * 在线用户监控 | ... | ... |
ruoyi/src/main/java/com/ruoyi/project/system/controller/SysConfigController.java renamed to ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysConfigController.java
| 1 | -package com.ruoyi.project.system.controller; | |
| 1 | +package com.ruoyi.web.controller.system; | |
| 2 | 2 | |
| 3 | 3 | import java.util.List; |
| 4 | 4 | import org.springframework.beans.factory.annotation.Autowired; |
| ... | ... | @@ -12,16 +12,17 @@ import org.springframework.web.bind.annotation.PutMapping; |
| 12 | 12 | import org.springframework.web.bind.annotation.RequestBody; |
| 13 | 13 | import org.springframework.web.bind.annotation.RequestMapping; |
| 14 | 14 | import org.springframework.web.bind.annotation.RestController; |
| 15 | +import com.ruoyi.common.annotation.Log; | |
| 16 | +import com.ruoyi.common.annotation.RepeatSubmit; | |
| 15 | 17 | import com.ruoyi.common.constant.UserConstants; |
| 18 | +import com.ruoyi.common.core.controller.BaseController; | |
| 19 | +import com.ruoyi.common.core.domain.AjaxResult; | |
| 20 | +import com.ruoyi.common.core.page.TableDataInfo; | |
| 21 | +import com.ruoyi.common.enums.BusinessType; | |
| 16 | 22 | import com.ruoyi.common.utils.SecurityUtils; |
| 17 | 23 | import com.ruoyi.common.utils.poi.ExcelUtil; |
| 18 | -import com.ruoyi.framework.aspectj.lang.annotation.Log; | |
| 19 | -import com.ruoyi.framework.aspectj.lang.enums.BusinessType; | |
| 20 | -import com.ruoyi.framework.web.controller.BaseController; | |
| 21 | -import com.ruoyi.framework.web.domain.AjaxResult; | |
| 22 | -import com.ruoyi.framework.web.page.TableDataInfo; | |
| 23 | -import com.ruoyi.project.system.domain.SysConfig; | |
| 24 | -import com.ruoyi.project.system.service.ISysConfigService; | |
| 24 | +import com.ruoyi.system.domain.SysConfig; | |
| 25 | +import com.ruoyi.system.service.ISysConfigService; | |
| 25 | 26 | |
| 26 | 27 | /** |
| 27 | 28 | * 参数配置 信息操作处理 |
| ... | ... | @@ -82,6 +83,7 @@ public class SysConfigController extends BaseController |
| 82 | 83 | @PreAuthorize("@ss.hasPermi('system:config:add')") |
| 83 | 84 | @Log(title = "参数管理", businessType = BusinessType.INSERT) |
| 84 | 85 | @PostMapping |
| 86 | + @RepeatSubmit | |
| 85 | 87 | public AjaxResult add(@Validated @RequestBody SysConfig config) |
| 86 | 88 | { |
| 87 | 89 | if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config))) | ... | ... |
ruoyi/src/main/java/com/ruoyi/project/system/controller/SysDeptController.java renamed to ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java
| 1 | -package com.ruoyi.project.system.controller; | |
| 1 | +package com.ruoyi.web.controller.system; | |
| 2 | 2 | |
| 3 | 3 | import java.util.Iterator; |
| 4 | 4 | import java.util.List; |
| ... | ... | @@ -14,15 +14,15 @@ import org.springframework.web.bind.annotation.PutMapping; |
| 14 | 14 | import org.springframework.web.bind.annotation.RequestBody; |
| 15 | 15 | import org.springframework.web.bind.annotation.RequestMapping; |
| 16 | 16 | import org.springframework.web.bind.annotation.RestController; |
| 17 | +import com.ruoyi.common.annotation.Log; | |
| 17 | 18 | import com.ruoyi.common.constant.UserConstants; |
| 19 | +import com.ruoyi.common.core.controller.BaseController; | |
| 20 | +import com.ruoyi.common.core.domain.AjaxResult; | |
| 21 | +import com.ruoyi.common.core.domain.entity.SysDept; | |
| 22 | +import com.ruoyi.common.enums.BusinessType; | |
| 18 | 23 | import com.ruoyi.common.utils.SecurityUtils; |
| 19 | 24 | import com.ruoyi.common.utils.StringUtils; |
| 20 | -import com.ruoyi.framework.aspectj.lang.annotation.Log; | |
| 21 | -import com.ruoyi.framework.aspectj.lang.enums.BusinessType; | |
| 22 | -import com.ruoyi.framework.web.controller.BaseController; | |
| 23 | -import com.ruoyi.framework.web.domain.AjaxResult; | |
| 24 | -import com.ruoyi.project.system.domain.SysDept; | |
| 25 | -import com.ruoyi.project.system.service.ISysDeptService; | |
| 25 | +import com.ruoyi.system.service.ISysDeptService; | |
| 26 | 26 | |
| 27 | 27 | /** |
| 28 | 28 | * 部门信息 | ... | ... |
ruoyi/src/main/java/com/ruoyi/project/system/controller/SysDictDataController.java renamed to ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictDataController.java
| 1 | -package com.ruoyi.project.system.controller; | |
| 1 | +package com.ruoyi.web.controller.system; | |
| 2 | 2 | |
| 3 | 3 | import java.util.List; |
| 4 | 4 | import org.springframework.beans.factory.annotation.Autowired; |
| ... | ... | @@ -12,16 +12,16 @@ import org.springframework.web.bind.annotation.PutMapping; |
| 12 | 12 | import org.springframework.web.bind.annotation.RequestBody; |
| 13 | 13 | import org.springframework.web.bind.annotation.RequestMapping; |
| 14 | 14 | import org.springframework.web.bind.annotation.RestController; |
| 15 | +import com.ruoyi.common.annotation.Log; | |
| 16 | +import com.ruoyi.common.core.controller.BaseController; | |
| 17 | +import com.ruoyi.common.core.domain.AjaxResult; | |
| 18 | +import com.ruoyi.common.core.domain.entity.SysDictData; | |
| 19 | +import com.ruoyi.common.core.page.TableDataInfo; | |
| 20 | +import com.ruoyi.common.enums.BusinessType; | |
| 15 | 21 | import com.ruoyi.common.utils.SecurityUtils; |
| 16 | 22 | import com.ruoyi.common.utils.poi.ExcelUtil; |
| 17 | -import com.ruoyi.framework.aspectj.lang.annotation.Log; | |
| 18 | -import com.ruoyi.framework.aspectj.lang.enums.BusinessType; | |
| 19 | -import com.ruoyi.framework.web.controller.BaseController; | |
| 20 | -import com.ruoyi.framework.web.domain.AjaxResult; | |
| 21 | -import com.ruoyi.framework.web.page.TableDataInfo; | |
| 22 | -import com.ruoyi.project.system.domain.SysDictData; | |
| 23 | -import com.ruoyi.project.system.service.ISysDictDataService; | |
| 24 | -import com.ruoyi.project.system.service.ISysDictTypeService; | |
| 23 | +import com.ruoyi.system.service.ISysDictDataService; | |
| 24 | +import com.ruoyi.system.service.ISysDictTypeService; | |
| 25 | 25 | |
| 26 | 26 | /** |
| 27 | 27 | * 数据字典信息 | ... | ... |
ruoyi/src/main/java/com/ruoyi/project/system/controller/SysDictTypeController.java renamed to ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictTypeController.java
| 1 | -package com.ruoyi.project.system.controller; | |
| 1 | +package com.ruoyi.web.controller.system; | |
| 2 | 2 | |
| 3 | 3 | import java.util.List; |
| 4 | 4 | import org.springframework.beans.factory.annotation.Autowired; |
| ... | ... | @@ -12,16 +12,16 @@ import org.springframework.web.bind.annotation.PutMapping; |
| 12 | 12 | import org.springframework.web.bind.annotation.RequestBody; |
| 13 | 13 | import org.springframework.web.bind.annotation.RequestMapping; |
| 14 | 14 | import org.springframework.web.bind.annotation.RestController; |
| 15 | +import com.ruoyi.common.annotation.Log; | |
| 15 | 16 | import com.ruoyi.common.constant.UserConstants; |
| 17 | +import com.ruoyi.common.core.controller.BaseController; | |
| 18 | +import com.ruoyi.common.core.domain.AjaxResult; | |
| 19 | +import com.ruoyi.common.core.domain.entity.SysDictType; | |
| 20 | +import com.ruoyi.common.core.page.TableDataInfo; | |
| 21 | +import com.ruoyi.common.enums.BusinessType; | |
| 16 | 22 | import com.ruoyi.common.utils.SecurityUtils; |
| 17 | 23 | import com.ruoyi.common.utils.poi.ExcelUtil; |
| 18 | -import com.ruoyi.framework.aspectj.lang.annotation.Log; | |
| 19 | -import com.ruoyi.framework.aspectj.lang.enums.BusinessType; | |
| 20 | -import com.ruoyi.framework.web.controller.BaseController; | |
| 21 | -import com.ruoyi.framework.web.domain.AjaxResult; | |
| 22 | -import com.ruoyi.framework.web.page.TableDataInfo; | |
| 23 | -import com.ruoyi.project.system.domain.SysDictType; | |
| 24 | -import com.ruoyi.project.system.service.ISysDictTypeService; | |
| 24 | +import com.ruoyi.system.service.ISysDictTypeService; | |
| 25 | 25 | |
| 26 | 26 | /** |
| 27 | 27 | * 数据字典信息 | ... | ... |
ruoyi/src/main/java/com/ruoyi/project/system/controller/SysLoginController.java renamed to ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java
| 1 | -package com.ruoyi.project.system.controller; | |
| 1 | +package com.ruoyi.web.controller.system; | |
| 2 | 2 | |
| 3 | 3 | import java.util.List; |
| 4 | 4 | import java.util.Set; |
| ... | ... | @@ -8,16 +8,16 @@ import org.springframework.web.bind.annotation.PostMapping; |
| 8 | 8 | import org.springframework.web.bind.annotation.RequestBody; |
| 9 | 9 | import org.springframework.web.bind.annotation.RestController; |
| 10 | 10 | import com.ruoyi.common.constant.Constants; |
| 11 | +import com.ruoyi.common.core.domain.AjaxResult; | |
| 12 | +import com.ruoyi.common.core.domain.entity.SysMenu; | |
| 13 | +import com.ruoyi.common.core.domain.entity.SysUser; | |
| 14 | +import com.ruoyi.common.core.domain.model.LoginBody; | |
| 15 | +import com.ruoyi.common.core.domain.model.LoginUser; | |
| 11 | 16 | import com.ruoyi.common.utils.ServletUtils; |
| 12 | -import com.ruoyi.framework.security.LoginBody; | |
| 13 | -import com.ruoyi.framework.security.LoginUser; | |
| 14 | -import com.ruoyi.framework.security.service.SysLoginService; | |
| 15 | -import com.ruoyi.framework.security.service.SysPermissionService; | |
| 16 | -import com.ruoyi.framework.security.service.TokenService; | |
| 17 | -import com.ruoyi.framework.web.domain.AjaxResult; | |
| 18 | -import com.ruoyi.project.system.domain.SysMenu; | |
| 19 | -import com.ruoyi.project.system.domain.SysUser; | |
| 20 | -import com.ruoyi.project.system.service.ISysMenuService; | |
| 17 | +import com.ruoyi.framework.web.service.SysLoginService; | |
| 18 | +import com.ruoyi.framework.web.service.SysPermissionService; | |
| 19 | +import com.ruoyi.framework.web.service.TokenService; | |
| 20 | +import com.ruoyi.system.service.ISysMenuService; | |
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | 23 | * 登录验证 | ... | ... |
ruoyi/src/main/java/com/ruoyi/project/system/controller/SysMenuController.java renamed to ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysMenuController.java
| 1 | -package com.ruoyi.project.system.controller; | |
| 1 | +package com.ruoyi.web.controller.system; | |
| 2 | 2 | |
| 3 | 3 | import java.util.List; |
| 4 | 4 | import org.springframework.beans.factory.annotation.Autowired; |
| ... | ... | @@ -12,19 +12,19 @@ import org.springframework.web.bind.annotation.PutMapping; |
| 12 | 12 | import org.springframework.web.bind.annotation.RequestBody; |
| 13 | 13 | import org.springframework.web.bind.annotation.RequestMapping; |
| 14 | 14 | import org.springframework.web.bind.annotation.RestController; |
| 15 | +import com.ruoyi.common.annotation.Log; | |
| 15 | 16 | import com.ruoyi.common.constant.Constants; |
| 16 | 17 | import com.ruoyi.common.constant.UserConstants; |
| 18 | +import com.ruoyi.common.core.controller.BaseController; | |
| 19 | +import com.ruoyi.common.core.domain.AjaxResult; | |
| 20 | +import com.ruoyi.common.core.domain.entity.SysMenu; | |
| 21 | +import com.ruoyi.common.core.domain.model.LoginUser; | |
| 22 | +import com.ruoyi.common.enums.BusinessType; | |
| 17 | 23 | import com.ruoyi.common.utils.SecurityUtils; |
| 18 | 24 | import com.ruoyi.common.utils.ServletUtils; |
| 19 | 25 | import com.ruoyi.common.utils.StringUtils; |
| 20 | -import com.ruoyi.framework.aspectj.lang.annotation.Log; | |
| 21 | -import com.ruoyi.framework.aspectj.lang.enums.BusinessType; | |
| 22 | -import com.ruoyi.framework.security.LoginUser; | |
| 23 | -import com.ruoyi.framework.security.service.TokenService; | |
| 24 | -import com.ruoyi.framework.web.controller.BaseController; | |
| 25 | -import com.ruoyi.framework.web.domain.AjaxResult; | |
| 26 | -import com.ruoyi.project.system.domain.SysMenu; | |
| 27 | -import com.ruoyi.project.system.service.ISysMenuService; | |
| 26 | +import com.ruoyi.framework.web.service.TokenService; | |
| 27 | +import com.ruoyi.system.service.ISysMenuService; | |
| 28 | 28 | |
| 29 | 29 | /** |
| 30 | 30 | * 菜单信息 | ... | ... |
ruoyi/src/main/java/com/ruoyi/project/system/controller/SysNoticeController.java renamed to ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysNoticeController.java
| 1 | -package com.ruoyi.project.system.controller; | |
| 1 | +package com.ruoyi.web.controller.system; | |
| 2 | 2 | |
| 3 | 3 | import java.util.List; |
| 4 | 4 | import org.springframework.beans.factory.annotation.Autowired; |
| ... | ... | @@ -12,14 +12,14 @@ import org.springframework.web.bind.annotation.PutMapping; |
| 12 | 12 | import org.springframework.web.bind.annotation.RequestBody; |
| 13 | 13 | import org.springframework.web.bind.annotation.RequestMapping; |
| 14 | 14 | import org.springframework.web.bind.annotation.RestController; |
| 15 | +import com.ruoyi.common.annotation.Log; | |
| 16 | +import com.ruoyi.common.core.controller.BaseController; | |
| 17 | +import com.ruoyi.common.core.domain.AjaxResult; | |
| 18 | +import com.ruoyi.common.core.page.TableDataInfo; | |
| 19 | +import com.ruoyi.common.enums.BusinessType; | |
| 15 | 20 | import com.ruoyi.common.utils.SecurityUtils; |
| 16 | -import com.ruoyi.framework.aspectj.lang.annotation.Log; | |
| 17 | -import com.ruoyi.framework.aspectj.lang.enums.BusinessType; | |
| 18 | -import com.ruoyi.framework.web.controller.BaseController; | |
| 19 | -import com.ruoyi.framework.web.domain.AjaxResult; | |
| 20 | -import com.ruoyi.framework.web.page.TableDataInfo; | |
| 21 | -import com.ruoyi.project.system.domain.SysNotice; | |
| 22 | -import com.ruoyi.project.system.service.ISysNoticeService; | |
| 21 | +import com.ruoyi.system.domain.SysNotice; | |
| 22 | +import com.ruoyi.system.service.ISysNoticeService; | |
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | 25 | * 公告 信息操作处理 | ... | ... |
ruoyi/src/main/java/com/ruoyi/project/system/controller/SysPostController.java renamed to ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysPostController.java
| 1 | -package com.ruoyi.project.system.controller; | |
| 1 | +package com.ruoyi.web.controller.system; | |
| 2 | 2 | |
| 3 | 3 | import java.util.List; |
| 4 | 4 | import org.springframework.beans.factory.annotation.Autowired; |
| ... | ... | @@ -12,16 +12,16 @@ import org.springframework.web.bind.annotation.PutMapping; |
| 12 | 12 | import org.springframework.web.bind.annotation.RequestBody; |
| 13 | 13 | import org.springframework.web.bind.annotation.RequestMapping; |
| 14 | 14 | import org.springframework.web.bind.annotation.RestController; |
| 15 | +import com.ruoyi.common.annotation.Log; | |
| 15 | 16 | import com.ruoyi.common.constant.UserConstants; |
| 17 | +import com.ruoyi.common.core.controller.BaseController; | |
| 18 | +import com.ruoyi.common.core.domain.AjaxResult; | |
| 19 | +import com.ruoyi.common.core.page.TableDataInfo; | |
| 20 | +import com.ruoyi.common.enums.BusinessType; | |
| 16 | 21 | import com.ruoyi.common.utils.SecurityUtils; |
| 17 | 22 | import com.ruoyi.common.utils.poi.ExcelUtil; |
| 18 | -import com.ruoyi.framework.aspectj.lang.annotation.Log; | |
| 19 | -import com.ruoyi.framework.aspectj.lang.enums.BusinessType; | |
| 20 | -import com.ruoyi.framework.web.controller.BaseController; | |
| 21 | -import com.ruoyi.framework.web.domain.AjaxResult; | |
| 22 | -import com.ruoyi.framework.web.page.TableDataInfo; | |
| 23 | -import com.ruoyi.project.system.domain.SysPost; | |
| 24 | -import com.ruoyi.project.system.service.ISysPostService; | |
| 23 | +import com.ruoyi.system.domain.SysPost; | |
| 24 | +import com.ruoyi.system.service.ISysPostService; | |
| 25 | 25 | |
| 26 | 26 | /** |
| 27 | 27 | * 岗位信息操作处理 | ... | ... |
ruoyi/src/main/java/com/ruoyi/project/system/controller/SysProfileController.java renamed to ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java
| 1 | -package com.ruoyi.project.system.controller; | |
| 1 | +package com.ruoyi.web.controller.system; | |
| 2 | 2 | |
| 3 | 3 | import java.io.IOException; |
| 4 | 4 | import org.springframework.beans.factory.annotation.Autowired; |
| ... | ... | @@ -10,18 +10,18 @@ import org.springframework.web.bind.annotation.RequestMapping; |
| 10 | 10 | import org.springframework.web.bind.annotation.RequestParam; |
| 11 | 11 | import org.springframework.web.bind.annotation.RestController; |
| 12 | 12 | import org.springframework.web.multipart.MultipartFile; |
| 13 | +import com.ruoyi.common.annotation.Log; | |
| 14 | +import com.ruoyi.common.config.RuoYiConfig; | |
| 15 | +import com.ruoyi.common.core.controller.BaseController; | |
| 16 | +import com.ruoyi.common.core.domain.AjaxResult; | |
| 17 | +import com.ruoyi.common.core.domain.entity.SysUser; | |
| 18 | +import com.ruoyi.common.core.domain.model.LoginUser; | |
| 19 | +import com.ruoyi.common.enums.BusinessType; | |
| 13 | 20 | import com.ruoyi.common.utils.SecurityUtils; |
| 14 | 21 | import com.ruoyi.common.utils.ServletUtils; |
| 15 | 22 | import com.ruoyi.common.utils.file.FileUploadUtils; |
| 16 | -import com.ruoyi.framework.aspectj.lang.annotation.Log; | |
| 17 | -import com.ruoyi.framework.aspectj.lang.enums.BusinessType; | |
| 18 | -import com.ruoyi.framework.config.RuoYiConfig; | |
| 19 | -import com.ruoyi.framework.security.LoginUser; | |
| 20 | -import com.ruoyi.framework.security.service.TokenService; | |
| 21 | -import com.ruoyi.framework.web.controller.BaseController; | |
| 22 | -import com.ruoyi.framework.web.domain.AjaxResult; | |
| 23 | -import com.ruoyi.project.system.domain.SysUser; | |
| 24 | -import com.ruoyi.project.system.service.ISysUserService; | |
| 23 | +import com.ruoyi.framework.web.service.TokenService; | |
| 24 | +import com.ruoyi.system.service.ISysUserService; | |
| 25 | 25 | |
| 26 | 26 | /** |
| 27 | 27 | * 个人信息 业务处理 | ... | ... |
ruoyi/src/main/java/com/ruoyi/project/system/controller/SysRoleController.java renamed to ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java
| 1 | -package com.ruoyi.project.system.controller; | |
| 1 | +package com.ruoyi.web.controller.system; | |
| 2 | 2 | |
| 3 | 3 | import java.util.List; |
| 4 | 4 | import org.springframework.beans.factory.annotation.Autowired; |
| ... | ... | @@ -12,16 +12,16 @@ import org.springframework.web.bind.annotation.PutMapping; |
| 12 | 12 | import org.springframework.web.bind.annotation.RequestBody; |
| 13 | 13 | import org.springframework.web.bind.annotation.RequestMapping; |
| 14 | 14 | import org.springframework.web.bind.annotation.RestController; |
| 15 | +import com.ruoyi.common.annotation.Log; | |
| 15 | 16 | import com.ruoyi.common.constant.UserConstants; |
| 17 | +import com.ruoyi.common.core.controller.BaseController; | |
| 18 | +import com.ruoyi.common.core.domain.AjaxResult; | |
| 19 | +import com.ruoyi.common.core.domain.entity.SysRole; | |
| 20 | +import com.ruoyi.common.core.page.TableDataInfo; | |
| 21 | +import com.ruoyi.common.enums.BusinessType; | |
| 16 | 22 | import com.ruoyi.common.utils.SecurityUtils; |
| 17 | 23 | import com.ruoyi.common.utils.poi.ExcelUtil; |
| 18 | -import com.ruoyi.framework.aspectj.lang.annotation.Log; | |
| 19 | -import com.ruoyi.framework.aspectj.lang.enums.BusinessType; | |
| 20 | -import com.ruoyi.framework.web.controller.BaseController; | |
| 21 | -import com.ruoyi.framework.web.domain.AjaxResult; | |
| 22 | -import com.ruoyi.framework.web.page.TableDataInfo; | |
| 23 | -import com.ruoyi.project.system.domain.SysRole; | |
| 24 | -import com.ruoyi.project.system.service.ISysRoleService; | |
| 24 | +import com.ruoyi.system.service.ISysRoleService; | |
| 25 | 25 | |
| 26 | 26 | /** |
| 27 | 27 | * 角色信息 |
| ... | ... | @@ -151,4 +151,4 @@ public class SysRoleController extends BaseController |
| 151 | 151 | { |
| 152 | 152 | return AjaxResult.success(roleService.selectRoleAll()); |
| 153 | 153 | } |
| 154 | -} | |
| 155 | 154 | \ No newline at end of file |
| 155 | +} | ... | ... |
ruoyi/src/main/java/com/ruoyi/project/system/controller/SysUserController.java renamed to ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
| 1 | -package com.ruoyi.project.system.controller; | |
| 1 | +package com.ruoyi.web.controller.system; | |
| 2 | 2 | |
| 3 | 3 | import java.util.List; |
| 4 | 4 | import java.util.stream.Collectors; |
| ... | ... | @@ -14,23 +14,23 @@ import org.springframework.web.bind.annotation.RequestBody; |
| 14 | 14 | import org.springframework.web.bind.annotation.RequestMapping; |
| 15 | 15 | import org.springframework.web.bind.annotation.RestController; |
| 16 | 16 | import org.springframework.web.multipart.MultipartFile; |
| 17 | +import com.ruoyi.common.annotation.Log; | |
| 17 | 18 | import com.ruoyi.common.constant.UserConstants; |
| 19 | +import com.ruoyi.common.core.controller.BaseController; | |
| 20 | +import com.ruoyi.common.core.domain.AjaxResult; | |
| 21 | +import com.ruoyi.common.core.domain.entity.SysRole; | |
| 22 | +import com.ruoyi.common.core.domain.entity.SysUser; | |
| 23 | +import com.ruoyi.common.core.domain.model.LoginUser; | |
| 24 | +import com.ruoyi.common.core.page.TableDataInfo; | |
| 25 | +import com.ruoyi.common.enums.BusinessType; | |
| 18 | 26 | import com.ruoyi.common.utils.SecurityUtils; |
| 19 | 27 | import com.ruoyi.common.utils.ServletUtils; |
| 20 | 28 | import com.ruoyi.common.utils.StringUtils; |
| 21 | 29 | import com.ruoyi.common.utils.poi.ExcelUtil; |
| 22 | -import com.ruoyi.framework.aspectj.lang.annotation.Log; | |
| 23 | -import com.ruoyi.framework.aspectj.lang.enums.BusinessType; | |
| 24 | -import com.ruoyi.framework.security.LoginUser; | |
| 25 | -import com.ruoyi.framework.security.service.TokenService; | |
| 26 | -import com.ruoyi.framework.web.controller.BaseController; | |
| 27 | -import com.ruoyi.framework.web.domain.AjaxResult; | |
| 28 | -import com.ruoyi.framework.web.page.TableDataInfo; | |
| 29 | -import com.ruoyi.project.system.domain.SysRole; | |
| 30 | -import com.ruoyi.project.system.domain.SysUser; | |
| 31 | -import com.ruoyi.project.system.service.ISysPostService; | |
| 32 | -import com.ruoyi.project.system.service.ISysRoleService; | |
| 33 | -import com.ruoyi.project.system.service.ISysUserService; | |
| 30 | +import com.ruoyi.framework.web.service.TokenService; | |
| 31 | +import com.ruoyi.system.service.ISysPostService; | |
| 32 | +import com.ruoyi.system.service.ISysRoleService; | |
| 33 | +import com.ruoyi.system.service.ISysUserService; | |
| 34 | 34 | |
| 35 | 35 | /** |
| 36 | 36 | * 用户信息 |
| ... | ... | @@ -198,4 +198,4 @@ public class SysUserController extends BaseController |
| 198 | 198 | user.setUpdateBy(SecurityUtils.getUsername()); |
| 199 | 199 | return toAjax(userService.updateUserStatus(user)); |
| 200 | 200 | } |
| 201 | -} | |
| 202 | 201 | \ No newline at end of file |
| 202 | +} | ... | ... |
ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/SwaggerController.java
0 → 100644
| 1 | +package com.ruoyi.web.controller.tool; | |
| 2 | + | |
| 3 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 4 | +import org.springframework.stereotype.Controller; | |
| 5 | +import org.springframework.web.bind.annotation.GetMapping; | |
| 6 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 7 | +import com.ruoyi.common.core.controller.BaseController; | |
| 8 | + | |
| 9 | +/** | |
| 10 | + * swagger 接口 | |
| 11 | + * | |
| 12 | + * @author ruoyi | |
| 13 | + */ | |
| 14 | +@Controller | |
| 15 | +@RequestMapping("/tool/swagger") | |
| 16 | +public class SwaggerController extends BaseController | |
| 17 | +{ | |
| 18 | + @PreAuthorize("@ss.hasPermi('tool:swagger:view')") | |
| 19 | + @GetMapping() | |
| 20 | + public String index() | |
| 21 | + { | |
| 22 | + return redirect("/swagger-ui.html"); | |
| 23 | + } | |
| 24 | +} | ... | ... |
ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/TestController.java
0 → 100644
| 1 | +package com.ruoyi.web.controller.tool; | |
| 2 | + | |
| 3 | +import java.util.ArrayList; | |
| 4 | +import java.util.LinkedHashMap; | |
| 5 | +import java.util.List; | |
| 6 | +import java.util.Map; | |
| 7 | +import org.springframework.web.bind.annotation.DeleteMapping; | |
| 8 | +import org.springframework.web.bind.annotation.GetMapping; | |
| 9 | +import org.springframework.web.bind.annotation.PathVariable; | |
| 10 | +import org.springframework.web.bind.annotation.PostMapping; | |
| 11 | +import org.springframework.web.bind.annotation.PutMapping; | |
| 12 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 13 | +import org.springframework.web.bind.annotation.RestController; | |
| 14 | +import com.ruoyi.common.core.controller.BaseController; | |
| 15 | +import com.ruoyi.common.core.domain.AjaxResult; | |
| 16 | +import com.ruoyi.common.utils.StringUtils; | |
| 17 | +import io.swagger.annotations.Api; | |
| 18 | +import io.swagger.annotations.ApiImplicitParam; | |
| 19 | +import io.swagger.annotations.ApiModel; | |
| 20 | +import io.swagger.annotations.ApiModelProperty; | |
| 21 | +import io.swagger.annotations.ApiOperation; | |
| 22 | + | |
| 23 | +/** | |
| 24 | + * swagger 用户测试方法 | |
| 25 | + * | |
| 26 | + * @author ruoyi | |
| 27 | + */ | |
| 28 | +@Api("用户信息管理") | |
| 29 | +@RestController | |
| 30 | +@RequestMapping("/test/user") | |
| 31 | +public class TestController extends BaseController | |
| 32 | +{ | |
| 33 | + private final static Map<Integer, UserEntity> users = new LinkedHashMap<Integer, UserEntity>(); | |
| 34 | + { | |
| 35 | + users.put(1, new UserEntity(1, "admin", "admin123", "15888888888")); | |
| 36 | + users.put(2, new UserEntity(2, "ry", "admin123", "15666666666")); | |
| 37 | + } | |
| 38 | + | |
| 39 | + @ApiOperation("获取用户列表") | |
| 40 | + @GetMapping("/list") | |
| 41 | + public AjaxResult userList() | |
| 42 | + { | |
| 43 | + List<UserEntity> userList = new ArrayList<UserEntity>(users.values()); | |
| 44 | + return AjaxResult.success(userList); | |
| 45 | + } | |
| 46 | + | |
| 47 | + @ApiOperation("获取用户详细") | |
| 48 | + @ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path") | |
| 49 | + @GetMapping("/{userId}") | |
| 50 | + public AjaxResult getUser(@PathVariable Integer userId) | |
| 51 | + { | |
| 52 | + if (!users.isEmpty() && users.containsKey(userId)) | |
| 53 | + { | |
| 54 | + return AjaxResult.success(users.get(userId)); | |
| 55 | + } | |
| 56 | + else | |
| 57 | + { | |
| 58 | + return AjaxResult.error("用户不存在"); | |
| 59 | + } | |
| 60 | + } | |
| 61 | + | |
| 62 | + @ApiOperation("新增用户") | |
| 63 | + @ApiImplicitParam(name = "userEntity", value = "新增用户信息", dataType = "UserEntity") | |
| 64 | + @PostMapping("/save") | |
| 65 | + public AjaxResult save(UserEntity user) | |
| 66 | + { | |
| 67 | + if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId())) | |
| 68 | + { | |
| 69 | + return AjaxResult.error("用户ID不能为空"); | |
| 70 | + } | |
| 71 | + return AjaxResult.success(users.put(user.getUserId(), user)); | |
| 72 | + } | |
| 73 | + | |
| 74 | + @ApiOperation("更新用户") | |
| 75 | + @ApiImplicitParam(name = "userEntity", value = "新增用户信息", dataType = "UserEntity") | |
| 76 | + @PutMapping("/update") | |
| 77 | + public AjaxResult update(UserEntity user) | |
| 78 | + { | |
| 79 | + if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId())) | |
| 80 | + { | |
| 81 | + return AjaxResult.error("用户ID不能为空"); | |
| 82 | + } | |
| 83 | + if (users.isEmpty() || !users.containsKey(user.getUserId())) | |
| 84 | + { | |
| 85 | + return AjaxResult.error("用户不存在"); | |
| 86 | + } | |
| 87 | + users.remove(user.getUserId()); | |
| 88 | + return AjaxResult.success(users.put(user.getUserId(), user)); | |
| 89 | + } | |
| 90 | + | |
| 91 | + @ApiOperation("删除用户信息") | |
| 92 | + @ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path") | |
| 93 | + @DeleteMapping("/{userId}") | |
| 94 | + public AjaxResult delete(@PathVariable Integer userId) | |
| 95 | + { | |
| 96 | + if (!users.isEmpty() && users.containsKey(userId)) | |
| 97 | + { | |
| 98 | + users.remove(userId); | |
| 99 | + return AjaxResult.success(); | |
| 100 | + } | |
| 101 | + else | |
| 102 | + { | |
| 103 | + return AjaxResult.error("用户不存在"); | |
| 104 | + } | |
| 105 | + } | |
| 106 | +} | |
| 107 | + | |
| 108 | +@ApiModel("用户实体") | |
| 109 | +class UserEntity | |
| 110 | +{ | |
| 111 | + @ApiModelProperty("用户ID") | |
| 112 | + private Integer userId; | |
| 113 | + | |
| 114 | + @ApiModelProperty("用户名称") | |
| 115 | + private String username; | |
| 116 | + | |
| 117 | + @ApiModelProperty("用户密码") | |
| 118 | + private String password; | |
| 119 | + | |
| 120 | + @ApiModelProperty("用户手机") | |
| 121 | + private String mobile; | |
| 122 | + | |
| 123 | + public UserEntity() | |
| 124 | + { | |
| 125 | + | |
| 126 | + } | |
| 127 | + | |
| 128 | + public UserEntity(Integer userId, String username, String password, String mobile) | |
| 129 | + { | |
| 130 | + this.userId = userId; | |
| 131 | + this.username = username; | |
| 132 | + this.password = password; | |
| 133 | + this.mobile = mobile; | |
| 134 | + } | |
| 135 | + | |
| 136 | + public Integer getUserId() | |
| 137 | + { | |
| 138 | + return userId; | |
| 139 | + } | |
| 140 | + | |
| 141 | + public void setUserId(Integer userId) | |
| 142 | + { | |
| 143 | + this.userId = userId; | |
| 144 | + } | |
| 145 | + | |
| 146 | + public String getUsername() | |
| 147 | + { | |
| 148 | + return username; | |
| 149 | + } | |
| 150 | + | |
| 151 | + public void setUsername(String username) | |
| 152 | + { | |
| 153 | + this.username = username; | |
| 154 | + } | |
| 155 | + | |
| 156 | + public String getPassword() | |
| 157 | + { | |
| 158 | + return password; | |
| 159 | + } | |
| 160 | + | |
| 161 | + public void setPassword(String password) | |
| 162 | + { | |
| 163 | + this.password = password; | |
| 164 | + } | |
| 165 | + | |
| 166 | + public String getMobile() | |
| 167 | + { | |
| 168 | + return mobile; | |
| 169 | + } | |
| 170 | + | |
| 171 | + public void setMobile(String mobile) | |
| 172 | + { | |
| 173 | + this.mobile = mobile; | |
| 174 | + } | |
| 175 | +} | ... | ... |
ruoyi/src/main/java/com/ruoyi/framework/config/SwaggerConfig.java renamed to ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java
| 1 | -package com.ruoyi.framework.config; | |
| 1 | +package com.ruoyi.web.core.config; | |
| 2 | 2 | |
| 3 | 3 | import java.util.ArrayList; |
| 4 | 4 | import java.util.List; |
| ... | ... | @@ -6,6 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired; |
| 6 | 6 | import org.springframework.beans.factory.annotation.Value; |
| 7 | 7 | import org.springframework.context.annotation.Bean; |
| 8 | 8 | import org.springframework.context.annotation.Configuration; |
| 9 | +import com.ruoyi.common.config.RuoYiConfig; | |
| 9 | 10 | import io.swagger.annotations.ApiOperation; |
| 10 | 11 | import springfox.documentation.builders.ApiInfoBuilder; |
| 11 | 12 | import springfox.documentation.builders.PathSelectors; | ... | ... |
ruoyi/src/main/resources/META-INF/spring-devtools.properties renamed to ruoyi-admin/src/main/resources/META-INF/spring-devtools.properties
ruoyi-admin/src/main/resources/application-druid.yml
0 → 100644
| 1 | +# 数据源配置 | |
| 2 | +spring: | |
| 3 | + datasource: | |
| 4 | + type: com.alibaba.druid.pool.DruidDataSource | |
| 5 | + driverClassName: com.mysql.cj.jdbc.Driver | |
| 6 | + druid: | |
| 7 | + # 主库数据源 | |
| 8 | + master: | |
| 9 | + url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 | |
| 10 | + username: root | |
| 11 | + password: password | |
| 12 | + # 从库数据源 | |
| 13 | + slave: | |
| 14 | + # 从数据源开关/默认关闭 | |
| 15 | + enabled: false | |
| 16 | + url: | |
| 17 | + username: | |
| 18 | + password: | |
| 19 | + # 初始连接数 | |
| 20 | + initialSize: 5 | |
| 21 | + # 最小连接池数量 | |
| 22 | + minIdle: 10 | |
| 23 | + # 最大连接池数量 | |
| 24 | + maxActive: 20 | |
| 25 | + # 配置获取连接等待超时的时间 | |
| 26 | + maxWait: 60000 | |
| 27 | + # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 | |
| 28 | + timeBetweenEvictionRunsMillis: 60000 | |
| 29 | + # 配置一个连接在池中最小生存的时间,单位是毫秒 | |
| 30 | + minEvictableIdleTimeMillis: 300000 | |
| 31 | + # 配置一个连接在池中最大生存的时间,单位是毫秒 | |
| 32 | + maxEvictableIdleTimeMillis: 900000 | |
| 33 | + # 配置检测连接是否有效 | |
| 34 | + validationQuery: SELECT 1 FROM DUAL | |
| 35 | + testWhileIdle: true | |
| 36 | + testOnBorrow: false | |
| 37 | + testOnReturn: false | |
| 38 | + webStatFilter: | |
| 39 | + enabled: true | |
| 40 | + statViewServlet: | |
| 41 | + enabled: true | |
| 42 | + # 设置白名单,不填则允许所有访问 | |
| 43 | + allow: | |
| 44 | + url-pattern: /druid/* | |
| 45 | + # 控制台管理用户名和密码 | |
| 46 | + login-username: | |
| 47 | + login-password: | |
| 48 | + filter: | |
| 49 | + stat: | |
| 50 | + enabled: true | |
| 51 | + # 慢SQL记录 | |
| 52 | + log-slow-sql: true | |
| 53 | + slow-sql-millis: 1000 | |
| 54 | + merge-sql: true | |
| 55 | + wall: | |
| 56 | + config: | |
| 57 | + multi-statement-allow: true | |
| 0 | 58 | \ No newline at end of file | ... | ... |
ruoyi-admin/src/main/resources/application.yml
0 → 100644
| 1 | +# 项目相关配置 | |
| 2 | +ruoyi: | |
| 3 | + # 名称 | |
| 4 | + name: RuoYi | |
| 5 | + # 版本 | |
| 6 | + version: 3.0.0 | |
| 7 | + # 版权年份 | |
| 8 | + copyrightYear: 2019 | |
| 9 | + # 实例演示开关 | |
| 10 | + demoEnabled: true | |
| 11 | + # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath) | |
| 12 | + profile: D:/ruoyi/uploadPath | |
| 13 | + # 获取ip地址开关 | |
| 14 | + addressEnabled: false | |
| 15 | + | |
| 16 | +# 开发环境配置 | |
| 17 | +server: | |
| 18 | + # 服务器的HTTP端口,默认为8080 | |
| 19 | + port: 8080 | |
| 20 | + servlet: | |
| 21 | + # 应用的访问路径 | |
| 22 | + context-path: / | |
| 23 | + tomcat: | |
| 24 | + # tomcat的URI编码 | |
| 25 | + uri-encoding: UTF-8 | |
| 26 | + # tomcat最大线程数,默认为200 | |
| 27 | + max-threads: 800 | |
| 28 | + # Tomcat启动初始化的线程数,默认值25 | |
| 29 | + min-spare-threads: 30 | |
| 30 | + | |
| 31 | +# 日志配置 | |
| 32 | +logging: | |
| 33 | + level: | |
| 34 | + com.ruoyi: debug | |
| 35 | + org.springframework: warn | |
| 36 | + | |
| 37 | +# Spring配置 | |
| 38 | +spring: | |
| 39 | + # 资源信息 | |
| 40 | + messages: | |
| 41 | + # 国际化资源文件路径 | |
| 42 | + basename: i18n/messages | |
| 43 | + profiles: | |
| 44 | + active: druid | |
| 45 | + # 文件上传 | |
| 46 | + servlet: | |
| 47 | + multipart: | |
| 48 | + # 单个文件大小 | |
| 49 | + max-file-size: 10MB | |
| 50 | + # 设置总上传的文件大小 | |
| 51 | + max-request-size: 20MB | |
| 52 | + # 服务模块 | |
| 53 | + devtools: | |
| 54 | + restart: | |
| 55 | + # 热部署开关 | |
| 56 | + enabled: true | |
| 57 | + # redis 配置 | |
| 58 | + redis: | |
| 59 | + # 地址 | |
| 60 | + host: localhost | |
| 61 | + # 端口,默认为6379 | |
| 62 | + port: 6379 | |
| 63 | + # 密码 | |
| 64 | + password: | |
| 65 | + # 连接超时时间 | |
| 66 | + timeout: 10s | |
| 67 | + lettuce: | |
| 68 | + pool: | |
| 69 | + # 连接池中的最小空闲连接 | |
| 70 | + min-idle: 0 | |
| 71 | + # 连接池中的最大空闲连接 | |
| 72 | + max-idle: 8 | |
| 73 | + # 连接池的最大数据库连接数 | |
| 74 | + max-active: 8 | |
| 75 | + # #连接池最大阻塞等待时间(使用负值表示没有限制) | |
| 76 | + max-wait: -1ms | |
| 77 | + | |
| 78 | +# token配置 | |
| 79 | +token: | |
| 80 | + # 令牌自定义标识 | |
| 81 | + header: Authorization | |
| 82 | + # 令牌密钥 | |
| 83 | + secret: abcdefghijklmnopqrstuvwxyz | |
| 84 | + # 令牌有效期(默认30分钟) | |
| 85 | + expireTime: 30 | |
| 86 | + | |
| 87 | +# MyBatis配置 | |
| 88 | +mybatis: | |
| 89 | + # 搜索指定包别名 | |
| 90 | + typeAliasesPackage: com.ruoyi.**.domain | |
| 91 | + # 配置mapper的扫描,找到所有的mapper.xml映射文件 | |
| 92 | + mapperLocations: classpath*:mapper/**/*Mapper.xml | |
| 93 | + # 加载全局的配置文件 | |
| 94 | + configLocation: classpath:mybatis/mybatis-config.xml | |
| 95 | + | |
| 96 | +# PageHelper分页插件 | |
| 97 | +pagehelper: | |
| 98 | + helperDialect: mysql | |
| 99 | + reasonable: true | |
| 100 | + supportMethodsArguments: true | |
| 101 | + params: count=countSql | |
| 102 | + | |
| 103 | +# Swagger配置 | |
| 104 | +swagger: | |
| 105 | + # 是否开启swagger | |
| 106 | + enabled: true | |
| 107 | + # 请求前缀 | |
| 108 | + pathMapping: /dev-api | |
| 109 | + | |
| 110 | +# 防止XSS攻击 | |
| 111 | +xss: | |
| 112 | + # 过滤开关 | |
| 113 | + enabled: true | |
| 114 | + # 排除链接(多个用逗号分隔) | |
| 115 | + excludes: /system/notice/* | |
| 116 | + # 匹配链接 | |
| 117 | + urlPatterns: /system/*,/monitor/*,/tool/* | ... | ... |
ruoyi-admin/src/main/resources/banner.txt
0 → 100644
| 1 | +Application Version: ${ruoyi.version} | |
| 2 | +Spring Boot Version: ${spring-boot.version} | |
| 3 | +//////////////////////////////////////////////////////////////////// | |
| 4 | +// _ooOoo_ // | |
| 5 | +// o8888888o // | |
| 6 | +// 88" . "88 // | |
| 7 | +// (| ^_^ |) // | |
| 8 | +// O\ = /O // | |
| 9 | +// ____/`---'\____ // | |
| 10 | +// .' \\| |// `. // | |
| 11 | +// / \\||| : |||// \ // | |
| 12 | +// / _||||| -:- |||||- \ // | |
| 13 | +// | | \\\ - /// | | // | |
| 14 | +// | \_| ''\---/'' | | // | |
| 15 | +// \ .-\__ `-` ___/-. / // | |
| 16 | +// ___`. .' /--.--\ `. . ___ // | |
| 17 | +// ."" '< `.___\_<|>_/___.' >'"". // | |
| 18 | +// | | : `- \`.;`\ _ /`;.`/ - ` : | | // | |
| 19 | +// \ \ `-. \_ __\ /__ _/ .-` / / // | |
| 20 | +// ========`-.____`-.___\_____/___.-`____.-'======== // | |
| 21 | +// `=---=' // | |
| 22 | +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // | |
| 23 | +// 佛祖保佑 永不宕机 永无BUG // | |
| 24 | +//////////////////////////////////////////////////////////////////// | |
| 0 | 25 | \ No newline at end of file | ... | ... |
ruoyi-admin/src/main/resources/i18n/messages.properties
0 → 100644
| 1 | +#错误消息 | |
| 2 | +not.null=* 必须填写 | |
| 3 | +user.jcaptcha.error=验证码错误 | |
| 4 | +user.jcaptcha.expire=验证码已失效 | |
| 5 | +user.not.exists=用户不存在/密码错误 | |
| 6 | +user.password.not.match=用户不存在/密码错误 | |
| 7 | +user.password.retry.limit.count=密码输入错误{0}次 | |
| 8 | +user.password.retry.limit.exceed=密码输入错误{0}次,帐户锁定10分钟 | |
| 9 | +user.password.delete=对不起,您的账号已被删除 | |
| 10 | +user.blocked=用户已封禁,请联系管理员 | |
| 11 | +role.blocked=角色已封禁,请联系管理员 | |
| 12 | +user.logout.success=退出成功 | |
| 13 | + | |
| 14 | +length.not.valid=长度必须在{min}到{max}个字符之间 | |
| 15 | + | |
| 16 | +user.username.not.valid=* 2到20个汉字、字母、数字或下划线组成,且必须以非数字开头 | |
| 17 | +user.password.not.valid=* 5-50个字符 | |
| 18 | + | |
| 19 | +user.email.not.valid=邮箱格式错误 | |
| 20 | +user.mobile.phone.number.not.valid=手机号格式错误 | |
| 21 | +user.login.success=登录成功 | |
| 22 | +user.notfound=请重新登录 | |
| 23 | +user.forcelogout=管理员强制退出,请重新登录 | |
| 24 | +user.unknown.error=未知错误,请重新登录 | |
| 25 | + | |
| 26 | +##文件上传消息 | |
| 27 | +upload.exceed.maxSize=上传的文件大小超出限制的文件大小!<br/>允许的文件最大大小是:{0}MB! | |
| 28 | +upload.filename.exceed.length=上传的文件名最长{0}个字符 | |
| 29 | + | |
| 30 | +##权限 | |
| 31 | +no.permission=您没有数据的权限,请联系管理员添加权限 [{0}] | |
| 32 | +no.create.permission=您没有创建数据的权限,请联系管理员添加权限 [{0}] | |
| 33 | +no.update.permission=您没有修改数据的权限,请联系管理员添加权限 [{0}] | |
| 34 | +no.delete.permission=您没有删除数据的权限,请联系管理员添加权限 [{0}] | |
| 35 | +no.export.permission=您没有导出数据的权限,请联系管理员添加权限 [{0}] | |
| 36 | +no.view.permission=您没有查看数据的权限,请联系管理员添加权限 [{0}] | ... | ... |
ruoyi-admin/src/main/resources/logback.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<configuration> | |
| 3 | + <!-- 日志存放路径 --> | |
| 4 | + <property name="log.path" value="/home/ruoyi/logs" /> | |
| 5 | + <!-- 日志输出格式 --> | |
| 6 | + <property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" /> | |
| 7 | + | |
| 8 | + <!-- 控制台输出 --> | |
| 9 | + <appender name="console" class="ch.qos.logback.core.ConsoleAppender"> | |
| 10 | + <encoder> | |
| 11 | + <pattern>${log.pattern}</pattern> | |
| 12 | + </encoder> | |
| 13 | + </appender> | |
| 14 | + | |
| 15 | + <!-- 系统日志输出 --> | |
| 16 | + <appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender"> | |
| 17 | + <file>${log.path}/sys-info.log</file> | |
| 18 | + <!-- 循环政策:基于时间创建日志文件 --> | |
| 19 | + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | |
| 20 | + <!-- 日志文件名格式 --> | |
| 21 | + <fileNamePattern>${log.path}/sys-info.%d{yyyy-MM-dd}.log</fileNamePattern> | |
| 22 | + <!-- 日志最大的历史 60天 --> | |
| 23 | + <maxHistory>60</maxHistory> | |
| 24 | + </rollingPolicy> | |
| 25 | + <encoder> | |
| 26 | + <pattern>${log.pattern}</pattern> | |
| 27 | + </encoder> | |
| 28 | + <filter class="ch.qos.logback.classic.filter.LevelFilter"> | |
| 29 | + <!-- 过滤的级别 --> | |
| 30 | + <level>INFO</level> | |
| 31 | + <!-- 匹配时的操作:接收(记录) --> | |
| 32 | + <onMatch>ACCEPT</onMatch> | |
| 33 | + <!-- 不匹配时的操作:拒绝(不记录) --> | |
| 34 | + <onMismatch>DENY</onMismatch> | |
| 35 | + </filter> | |
| 36 | + </appender> | |
| 37 | + | |
| 38 | + <appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender"> | |
| 39 | + <file>${log.path}/sys-error.log</file> | |
| 40 | + <!-- 循环政策:基于时间创建日志文件 --> | |
| 41 | + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | |
| 42 | + <!-- 日志文件名格式 --> | |
| 43 | + <fileNamePattern>${log.path}/sys-error.%d{yyyy-MM-dd}.log</fileNamePattern> | |
| 44 | + <!-- 日志最大的历史 60天 --> | |
| 45 | + <maxHistory>60</maxHistory> | |
| 46 | + </rollingPolicy> | |
| 47 | + <encoder> | |
| 48 | + <pattern>${log.pattern}</pattern> | |
| 49 | + </encoder> | |
| 50 | + <filter class="ch.qos.logback.classic.filter.LevelFilter"> | |
| 51 | + <!-- 过滤的级别 --> | |
| 52 | + <level>ERROR</level> | |
| 53 | + <!-- 匹配时的操作:接收(记录) --> | |
| 54 | + <onMatch>ACCEPT</onMatch> | |
| 55 | + <!-- 不匹配时的操作:拒绝(不记录) --> | |
| 56 | + <onMismatch>DENY</onMismatch> | |
| 57 | + </filter> | |
| 58 | + </appender> | |
| 59 | + | |
| 60 | + <!-- 用户访问日志输出 --> | |
| 61 | + <appender name="sys-user" class="ch.qos.logback.core.rolling.RollingFileAppender"> | |
| 62 | + <file>${log.path}/sys-user.log</file> | |
| 63 | + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | |
| 64 | + <!-- 按天回滚 daily --> | |
| 65 | + <fileNamePattern>${log.path}/sys-user.%d{yyyy-MM-dd}.log</fileNamePattern> | |
| 66 | + <!-- 日志最大的历史 60天 --> | |
| 67 | + <maxHistory>60</maxHistory> | |
| 68 | + </rollingPolicy> | |
| 69 | + <encoder> | |
| 70 | + <pattern>${log.pattern}</pattern> | |
| 71 | + </encoder> | |
| 72 | + </appender> | |
| 73 | + | |
| 74 | + <!-- 系统模块日志级别控制 --> | |
| 75 | + <logger name="com.ruoyi" level="info" /> | |
| 76 | + <!-- Spring日志级别控制 --> | |
| 77 | + <logger name="org.springframework" level="warn" /> | |
| 78 | + | |
| 79 | + <root level="info"> | |
| 80 | + <appender-ref ref="console" /> | |
| 81 | + </root> | |
| 82 | + | |
| 83 | + <!--系统操作日志--> | |
| 84 | + <root level="info"> | |
| 85 | + <appender-ref ref="file_info" /> | |
| 86 | + <appender-ref ref="file_error" /> | |
| 87 | + </root> | |
| 88 | + | |
| 89 | + <!--系统用户操作日志--> | |
| 90 | + <logger name="sys-user" level="info"> | |
| 91 | + <appender-ref ref="sys-user"/> | |
| 92 | + </logger> | |
| 93 | +</configuration> | |
| 0 | 94 | \ No newline at end of file | ... | ... |
ruoyi-admin/src/main/resources/mybatis/mybatis-config.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8" ?> | |
| 2 | +<!DOCTYPE configuration | |
| 3 | +PUBLIC "-//mybatis.org//DTD Config 3.0//EN" | |
| 4 | +"http://mybatis.org/dtd/mybatis-3-config.dtd"> | |
| 5 | +<configuration> | |
| 6 | + | |
| 7 | + <settings> | |
| 8 | + <setting name="cacheEnabled" value="true" /> <!-- 全局映射器启用缓存 --> | |
| 9 | + <setting name="useGeneratedKeys" value="true" /> <!-- 允许 JDBC 支持自动生成主键 --> | |
| 10 | + <setting name="defaultExecutorType" value="REUSE" /> <!-- 配置默认的执行器 --> | |
| 11 | + <setting name="logImpl" value="SLF4J" /> <!-- 指定 MyBatis 所用日志的具体实现 --> | |
| 12 | + <!-- <setting name="mapUnderscoreToCamelCase" value="true"/> 驼峰式命名 --> | |
| 13 | + </settings> | |
| 14 | + | |
| 15 | +</configuration> | ... | ... |
ruoyi-common/pom.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<project xmlns="http://maven.apache.org/POM/4.0.0" | |
| 3 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| 4 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| 5 | + <parent> | |
| 6 | + <artifactId>ruoyi</artifactId> | |
| 7 | + <groupId>com.ruoyi</groupId> | |
| 8 | + <version>3.0.0</version> | |
| 9 | + </parent> | |
| 10 | + <modelVersion>4.0.0</modelVersion> | |
| 11 | + | |
| 12 | + <artifactId>ruoyi-common</artifactId> | |
| 13 | + | |
| 14 | + <description> | |
| 15 | + common通用工具 | |
| 16 | + </description> | |
| 17 | + | |
| 18 | + <dependencies> | |
| 19 | + | |
| 20 | + <!-- Spring框架基本的核心工具 --> | |
| 21 | + <dependency> | |
| 22 | + <groupId>org.springframework</groupId> | |
| 23 | + <artifactId>spring-context-support</artifactId> | |
| 24 | + </dependency> | |
| 25 | + | |
| 26 | + <!-- SpringWeb模块 --> | |
| 27 | + <dependency> | |
| 28 | + <groupId>org.springframework</groupId> | |
| 29 | + <artifactId>spring-web</artifactId> | |
| 30 | + </dependency> | |
| 31 | + | |
| 32 | + <!-- spring security 安全认证 --> | |
| 33 | + <dependency> | |
| 34 | + <groupId>org.springframework.boot</groupId> | |
| 35 | + <artifactId>spring-boot-starter-security</artifactId> | |
| 36 | + </dependency> | |
| 37 | + | |
| 38 | + <!-- pagehelper 分页插件 --> | |
| 39 | + <dependency> | |
| 40 | + <groupId>com.github.pagehelper</groupId> | |
| 41 | + <artifactId>pagehelper-spring-boot-starter</artifactId> | |
| 42 | + </dependency> | |
| 43 | + | |
| 44 | + <!-- 自定义验证注解 --> | |
| 45 | + <dependency> | |
| 46 | + <groupId>javax.validation</groupId> | |
| 47 | + <artifactId>validation-api</artifactId> | |
| 48 | + </dependency> | |
| 49 | + | |
| 50 | + <!--常用工具类 --> | |
| 51 | + <dependency> | |
| 52 | + <groupId>org.apache.commons</groupId> | |
| 53 | + <artifactId>commons-lang3</artifactId> | |
| 54 | + </dependency> | |
| 55 | + | |
| 56 | + <!-- JSON工具类 --> | |
| 57 | + <dependency> | |
| 58 | + <groupId>com.fasterxml.jackson.core</groupId> | |
| 59 | + <artifactId>jackson-databind</artifactId> | |
| 60 | + </dependency> | |
| 61 | + | |
| 62 | + <!-- 阿里JSON解析器 --> | |
| 63 | + <dependency> | |
| 64 | + <groupId>com.alibaba</groupId> | |
| 65 | + <artifactId>fastjson</artifactId> | |
| 66 | + </dependency> | |
| 67 | + | |
| 68 | + <!-- io常用工具类 --> | |
| 69 | + <dependency> | |
| 70 | + <groupId>commons-io</groupId> | |
| 71 | + <artifactId>commons-io</artifactId> | |
| 72 | + </dependency> | |
| 73 | + | |
| 74 | + <!-- 文件上传工具类 --> | |
| 75 | + <dependency> | |
| 76 | + <groupId>commons-fileupload</groupId> | |
| 77 | + <artifactId>commons-fileupload</artifactId> | |
| 78 | + </dependency> | |
| 79 | + | |
| 80 | + <!-- excel工具 --> | |
| 81 | + <dependency> | |
| 82 | + <groupId>org.apache.poi</groupId> | |
| 83 | + <artifactId>poi-ooxml</artifactId> | |
| 84 | + </dependency> | |
| 85 | + | |
| 86 | + <!-- yml解析器 --> | |
| 87 | + <dependency> | |
| 88 | + <groupId>org.yaml</groupId> | |
| 89 | + <artifactId>snakeyaml</artifactId> | |
| 90 | + </dependency> | |
| 91 | + | |
| 92 | + <!--Token生成与解析--> | |
| 93 | + <dependency> | |
| 94 | + <groupId>io.jsonwebtoken</groupId> | |
| 95 | + <artifactId>jjwt</artifactId> | |
| 96 | + </dependency> | |
| 97 | + | |
| 98 | + <!-- redis 缓存操作 --> | |
| 99 | + <dependency> | |
| 100 | + <groupId>org.springframework.boot</groupId> | |
| 101 | + <artifactId>spring-boot-starter-data-redis</artifactId> | |
| 102 | + </dependency> | |
| 103 | + | |
| 104 | + <!-- pool 对象池 --> | |
| 105 | + <dependency> | |
| 106 | + <groupId>org.apache.commons</groupId> | |
| 107 | + <artifactId>commons-pool2</artifactId> | |
| 108 | + </dependency> | |
| 109 | + | |
| 110 | + <!-- 解析客户端操作系统、浏览器等 --> | |
| 111 | + <dependency> | |
| 112 | + <groupId>eu.bitwalker</groupId> | |
| 113 | + <artifactId>UserAgentUtils</artifactId> | |
| 114 | + </dependency> | |
| 115 | + | |
| 116 | + <!-- servlet包 --> | |
| 117 | + <dependency> | |
| 118 | + <groupId>javax.servlet</groupId> | |
| 119 | + <artifactId>javax.servlet-api</artifactId> | |
| 120 | + </dependency> | |
| 121 | + | |
| 122 | + </dependencies> | |
| 123 | + | |
| 124 | +</project> | |
| 0 | 125 | \ No newline at end of file | ... | ... |
ruoyi/src/main/java/com/ruoyi/framework/aspectj/lang/annotation/DataScope.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/annotation/DataScope.java
ruoyi/src/main/java/com/ruoyi/framework/aspectj/lang/annotation/DataSource.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/annotation/DataSource.java
| 1 | -package com.ruoyi.framework.aspectj.lang.annotation; | |
| 1 | +package com.ruoyi.common.annotation; | |
| 2 | 2 | |
| 3 | 3 | import java.lang.annotation.Documented; |
| 4 | 4 | import java.lang.annotation.ElementType; |
| ... | ... | @@ -6,7 +6,7 @@ import java.lang.annotation.Inherited; |
| 6 | 6 | import java.lang.annotation.Retention; |
| 7 | 7 | import java.lang.annotation.RetentionPolicy; |
| 8 | 8 | import java.lang.annotation.Target; |
| 9 | -import com.ruoyi.framework.aspectj.lang.enums.DataSourceType; | |
| 9 | +import com.ruoyi.common.enums.DataSourceType; | |
| 10 | 10 | |
| 11 | 11 | /** |
| 12 | 12 | * 自定义多数据源切换注解 | ... | ... |
ruoyi/src/main/java/com/ruoyi/framework/aspectj/lang/annotation/Excel.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/annotation/Excel.java
| 1 | -package com.ruoyi.framework.aspectj.lang.annotation; | |
| 2 | - | |
| 3 | -import java.lang.annotation.ElementType; | |
| 4 | -import java.lang.annotation.Retention; | |
| 5 | -import java.lang.annotation.RetentionPolicy; | |
| 6 | -import java.lang.annotation.Target; | |
| 7 | - | |
| 8 | -/** | |
| 9 | - * 自定义导出Excel数据注解 | |
| 10 | - * | |
| 11 | - * @author ruoyi | |
| 12 | - */ | |
| 13 | -@Retention(RetentionPolicy.RUNTIME) | |
| 14 | -@Target(ElementType.FIELD) | |
| 15 | -public @interface Excel | |
| 16 | -{ | |
| 17 | - /** | |
| 18 | - * 导出时在excel中排序 | |
| 19 | - */ | |
| 20 | - public int sort() default Integer.MAX_VALUE; | |
| 21 | - | |
| 22 | - /** | |
| 23 | - * 导出到Excel中的名字. | |
| 24 | - */ | |
| 25 | - public String name() default ""; | |
| 26 | - | |
| 27 | - /** | |
| 28 | - * 日期格式, 如: yyyy-MM-dd | |
| 29 | - */ | |
| 30 | - public String dateFormat() default ""; | |
| 31 | - | |
| 32 | - /** | |
| 33 | - * 读取内容转表达式 (如: 0=男,1=女,2=未知) | |
| 34 | - */ | |
| 35 | - public String readConverterExp() default ""; | |
| 36 | - | |
| 37 | - /** | |
| 38 | - * 导出类型(0数字 1字符串) | |
| 39 | - */ | |
| 40 | - public ColumnType cellType() default ColumnType.STRING; | |
| 41 | - | |
| 42 | - /** | |
| 43 | - * 导出时在excel中每个列的高度 单位为字符 | |
| 44 | - */ | |
| 45 | - public double height() default 14; | |
| 46 | - | |
| 47 | - /** | |
| 48 | - * 导出时在excel中每个列的宽 单位为字符 | |
| 49 | - */ | |
| 50 | - public double width() default 16; | |
| 51 | - | |
| 52 | - /** | |
| 53 | - * 文字后缀,如% 90 变成90% | |
| 54 | - */ | |
| 55 | - public String suffix() default ""; | |
| 56 | - | |
| 57 | - /** | |
| 58 | - * 当值为空时,字段的默认值 | |
| 59 | - */ | |
| 60 | - public String defaultValue() default ""; | |
| 61 | - | |
| 62 | - /** | |
| 63 | - * 提示信息 | |
| 64 | - */ | |
| 65 | - public String prompt() default ""; | |
| 66 | - | |
| 67 | - /** | |
| 68 | - * 设置只能选择不能输入的列内容. | |
| 69 | - */ | |
| 70 | - public String[] combo() default {}; | |
| 71 | - | |
| 72 | - /** | |
| 73 | - * 是否导出数据,应对需求:有时我们需要导出一份模板,这是标题需要但内容需要用户手工填写. | |
| 74 | - */ | |
| 75 | - public boolean isExport() default true; | |
| 76 | - | |
| 77 | - /** | |
| 78 | - * 另一个类中的属性名称,支持多级获取,以小数点隔开 | |
| 79 | - */ | |
| 80 | - public String targetAttr() default ""; | |
| 81 | - | |
| 82 | - /** | |
| 83 | - * 字段类型(0:导出导入;1:仅导出;2:仅导入) | |
| 84 | - */ | |
| 85 | - Type type() default Type.ALL; | |
| 86 | - | |
| 87 | - public enum Type | |
| 88 | - { | |
| 89 | - ALL(0), EXPORT(1), IMPORT(2); | |
| 90 | - private final int value; | |
| 91 | - | |
| 92 | - Type(int value) | |
| 93 | - { | |
| 94 | - this.value = value; | |
| 95 | - } | |
| 96 | - | |
| 97 | - public int value() | |
| 98 | - { | |
| 99 | - return this.value; | |
| 100 | - } | |
| 101 | - } | |
| 102 | - | |
| 103 | - public enum ColumnType | |
| 104 | - { | |
| 105 | - NUMERIC(0), STRING(1); | |
| 106 | - private final int value; | |
| 107 | - | |
| 108 | - ColumnType(int value) | |
| 109 | - { | |
| 110 | - this.value = value; | |
| 111 | - } | |
| 112 | - | |
| 113 | - public int value() | |
| 114 | - { | |
| 115 | - return this.value; | |
| 116 | - } | |
| 117 | - } | |
| 118 | -} | |
| 119 | 1 | \ No newline at end of file |
| 2 | +package com.ruoyi.common.annotation; | |
| 3 | + | |
| 4 | +import java.lang.annotation.ElementType; | |
| 5 | +import java.lang.annotation.Retention; | |
| 6 | +import java.lang.annotation.RetentionPolicy; | |
| 7 | +import java.lang.annotation.Target; | |
| 8 | + | |
| 9 | +/** | |
| 10 | + * 自定义导出Excel数据注解 | |
| 11 | + * | |
| 12 | + * @author ruoyi | |
| 13 | + */ | |
| 14 | +@Retention(RetentionPolicy.RUNTIME) | |
| 15 | +@Target(ElementType.FIELD) | |
| 16 | +public @interface Excel | |
| 17 | +{ | |
| 18 | + /** | |
| 19 | + * 导出时在excel中排序 | |
| 20 | + */ | |
| 21 | + public int sort() default Integer.MAX_VALUE; | |
| 22 | + | |
| 23 | + /** | |
| 24 | + * 导出到Excel中的名字. | |
| 25 | + */ | |
| 26 | + public String name() default ""; | |
| 27 | + | |
| 28 | + /** | |
| 29 | + * 日期格式, 如: yyyy-MM-dd | |
| 30 | + */ | |
| 31 | + public String dateFormat() default ""; | |
| 32 | + | |
| 33 | + /** | |
| 34 | + * 读取内容转表达式 (如: 0=男,1=女,2=未知) | |
| 35 | + */ | |
| 36 | + public String readConverterExp() default ""; | |
| 37 | + | |
| 38 | + /** | |
| 39 | + * 导出类型(0数字 1字符串) | |
| 40 | + */ | |
| 41 | + public ColumnType cellType() default ColumnType.STRING; | |
| 42 | + | |
| 43 | + /** | |
| 44 | + * 导出时在excel中每个列的高度 单位为字符 | |
| 45 | + */ | |
| 46 | + public double height() default 14; | |
| 47 | + | |
| 48 | + /** | |
| 49 | + * 导出时在excel中每个列的宽 单位为字符 | |
| 50 | + */ | |
| 51 | + public double width() default 16; | |
| 52 | + | |
| 53 | + /** | |
| 54 | + * 文字后缀,如% 90 变成90% | |
| 55 | + */ | |
| 56 | + public String suffix() default ""; | |
| 57 | + | |
| 58 | + /** | |
| 59 | + * 当值为空时,字段的默认值 | |
| 60 | + */ | |
| 61 | + public String defaultValue() default ""; | |
| 62 | + | |
| 63 | + /** | |
| 64 | + * 提示信息 | |
| 65 | + */ | |
| 66 | + public String prompt() default ""; | |
| 67 | + | |
| 68 | + /** | |
| 69 | + * 设置只能选择不能输入的列内容. | |
| 70 | + */ | |
| 71 | + public String[] combo() default {}; | |
| 72 | + | |
| 73 | + /** | |
| 74 | + * 是否导出数据,应对需求:有时我们需要导出一份模板,这是标题需要但内容需要用户手工填写. | |
| 75 | + */ | |
| 76 | + public boolean isExport() default true; | |
| 77 | + | |
| 78 | + /** | |
| 79 | + * 另一个类中的属性名称,支持多级获取,以小数点隔开 | |
| 80 | + */ | |
| 81 | + public String targetAttr() default ""; | |
| 82 | + | |
| 83 | + /** | |
| 84 | + * 字段类型(0:导出导入;1:仅导出;2:仅导入) | |
| 85 | + */ | |
| 86 | + Type type() default Type.ALL; | |
| 87 | + | |
| 88 | + public enum Type | |
| 89 | + { | |
| 90 | + ALL(0), EXPORT(1), IMPORT(2); | |
| 91 | + private final int value; | |
| 92 | + | |
| 93 | + Type(int value) | |
| 94 | + { | |
| 95 | + this.value = value; | |
| 96 | + } | |
| 97 | + | |
| 98 | + public int value() | |
| 99 | + { | |
| 100 | + return this.value; | |
| 101 | + } | |
| 102 | + } | |
| 103 | + | |
| 104 | + public enum ColumnType | |
| 105 | + { | |
| 106 | + NUMERIC(0), STRING(1); | |
| 107 | + private final int value; | |
| 108 | + | |
| 109 | + ColumnType(int value) | |
| 110 | + { | |
| 111 | + this.value = value; | |
| 112 | + } | |
| 113 | + | |
| 114 | + public int value() | |
| 115 | + { | |
| 116 | + return this.value; | |
| 117 | + } | |
| 118 | + } | |
| 119 | +} | ... | ... |
ruoyi/src/main/java/com/ruoyi/framework/aspectj/lang/annotation/Excels.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/annotation/Excels.java
| 1 | -package com.ruoyi.framework.aspectj.lang.annotation; | |
| 2 | - | |
| 3 | -import java.lang.annotation.ElementType; | |
| 4 | -import java.lang.annotation.Retention; | |
| 5 | -import java.lang.annotation.RetentionPolicy; | |
| 6 | -import java.lang.annotation.Target; | |
| 7 | - | |
| 8 | -/** | |
| 9 | - * Excel注解集 | |
| 10 | - * | |
| 11 | - * @author ruoyi | |
| 12 | - */ | |
| 13 | -@Target(ElementType.FIELD) | |
| 14 | -@Retention(RetentionPolicy.RUNTIME) | |
| 15 | -public @interface Excels | |
| 16 | -{ | |
| 17 | - Excel[] value(); | |
| 18 | -} | |
| 19 | 1 | \ No newline at end of file |
| 2 | +package com.ruoyi.common.annotation; | |
| 3 | + | |
| 4 | +import java.lang.annotation.ElementType; | |
| 5 | +import java.lang.annotation.Retention; | |
| 6 | +import java.lang.annotation.RetentionPolicy; | |
| 7 | +import java.lang.annotation.Target; | |
| 8 | + | |
| 9 | +/** | |
| 10 | + * Excel注解集 | |
| 11 | + * | |
| 12 | + * @author ruoyi | |
| 13 | + */ | |
| 14 | +@Target(ElementType.FIELD) | |
| 15 | +@Retention(RetentionPolicy.RUNTIME) | |
| 16 | +public @interface Excels | |
| 17 | +{ | |
| 18 | + Excel[] value(); | |
| 19 | +} | ... | ... |
ruoyi/src/main/java/com/ruoyi/framework/aspectj/lang/annotation/Log.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/annotation/Log.java
| 1 | -package com.ruoyi.framework.aspectj.lang.annotation; | |
| 1 | +package com.ruoyi.common.annotation; | |
| 2 | 2 | |
| 3 | 3 | import java.lang.annotation.Documented; |
| 4 | 4 | import java.lang.annotation.ElementType; |
| 5 | 5 | import java.lang.annotation.Retention; |
| 6 | 6 | import java.lang.annotation.RetentionPolicy; |
| 7 | 7 | import java.lang.annotation.Target; |
| 8 | -import com.ruoyi.framework.aspectj.lang.enums.BusinessType; | |
| 9 | -import com.ruoyi.framework.aspectj.lang.enums.OperatorType; | |
| 8 | +import com.ruoyi.common.enums.BusinessType; | |
| 9 | +import com.ruoyi.common.enums.OperatorType; | |
| 10 | 10 | |
| 11 | 11 | /** |
| 12 | 12 | * 自定义操作日志记录注解 | ... | ... |
ruoyi/src/main/java/com/ruoyi/framework/interceptor/annotation/RepeatSubmit.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/annotation/RepeatSubmit.java
| 1 | -package com.ruoyi.framework.interceptor.annotation; | |
| 2 | - | |
| 3 | -import java.lang.annotation.Documented; | |
| 4 | -import java.lang.annotation.ElementType; | |
| 5 | -import java.lang.annotation.Inherited; | |
| 6 | -import java.lang.annotation.Retention; | |
| 7 | -import java.lang.annotation.RetentionPolicy; | |
| 8 | -import java.lang.annotation.Target; | |
| 9 | - | |
| 10 | -/** | |
| 11 | - * 自定义注解防止表单重复提交 | |
| 12 | - * | |
| 13 | - * @author ruoyi | |
| 14 | - * | |
| 15 | - */ | |
| 16 | -@Inherited | |
| 17 | -@Target(ElementType.METHOD) | |
| 18 | -@Retention(RetentionPolicy.RUNTIME) | |
| 19 | -@Documented | |
| 20 | -public @interface RepeatSubmit | |
| 21 | -{ | |
| 22 | - | |
| 23 | -} | |
| 24 | 1 | \ No newline at end of file |
| 2 | +package com.ruoyi.common.annotation; | |
| 3 | + | |
| 4 | +import java.lang.annotation.Documented; | |
| 5 | +import java.lang.annotation.ElementType; | |
| 6 | +import java.lang.annotation.Inherited; | |
| 7 | +import java.lang.annotation.Retention; | |
| 8 | +import java.lang.annotation.RetentionPolicy; | |
| 9 | +import java.lang.annotation.Target; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 自定义注解防止表单重复提交 | |
| 13 | + * | |
| 14 | + * @author ruoyi | |
| 15 | + * | |
| 16 | + */ | |
| 17 | +@Inherited | |
| 18 | +@Target(ElementType.METHOD) | |
| 19 | +@Retention(RetentionPolicy.RUNTIME) | |
| 20 | +@Documented | |
| 21 | +public @interface RepeatSubmit | |
| 22 | +{ | |
| 23 | + | |
| 24 | +} | ... | ... |
ruoyi/src/main/java/com/ruoyi/framework/config/RuoYiConfig.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/config/RuoYiConfig.java
| 1 | -package com.ruoyi.framework.config; | |
| 1 | +package com.ruoyi.common.config; | |
| 2 | 2 | |
| 3 | 3 | import org.springframework.boot.context.properties.ConfigurationProperties; |
| 4 | 4 | import org.springframework.stereotype.Component; |
| ... | ... | @@ -113,4 +113,4 @@ public class RuoYiConfig |
| 113 | 113 | { |
| 114 | 114 | return getProfile() + "/upload"; |
| 115 | 115 | } |
| 116 | -} | |
| 117 | 116 | \ No newline at end of file |
| 117 | +} | ... | ... |
ruoyi/src/main/java/com/ruoyi/common/constant/Constants.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java
| 1 | 1 | package com.ruoyi.common.constant; |
| 2 | 2 | |
| 3 | -import io.jsonwebtoken.Claims; | |
| 4 | - | |
| 5 | 3 | /** |
| 6 | 4 | * 通用常量信息 |
| 7 | 5 | * |
| ... | ... | @@ -92,7 +90,7 @@ public class Constants |
| 92 | 90 | /** |
| 93 | 91 | * 用户名称 |
| 94 | 92 | */ |
| 95 | - public static final String JWT_USERNAME = Claims.SUBJECT; | |
| 93 | + public static final String JWT_USERNAME = "sub"; | |
| 96 | 94 | |
| 97 | 95 | /** |
| 98 | 96 | * 用户头像 | ... | ... |
ruoyi/src/main/java/com/ruoyi/common/constant/GenConstants.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/constant/GenConstants.java
ruoyi/src/main/java/com/ruoyi/common/constant/HttpStatus.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/constant/HttpStatus.java
ruoyi/src/main/java/com/ruoyi/common/constant/ScheduleConstants.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/constant/ScheduleConstants.java
| 1 | -package com.ruoyi.common.constant; | |
| 2 | - | |
| 3 | -/** | |
| 4 | - * 任务调度通用常量 | |
| 5 | - * | |
| 6 | - * @author ruoyi | |
| 7 | - */ | |
| 8 | -public class ScheduleConstants | |
| 9 | -{ | |
| 10 | - public static final String TASK_CLASS_NAME = "TASK_CLASS_NAME"; | |
| 11 | - | |
| 12 | - /** 执行目标key */ | |
| 13 | - public static final String TASK_PROPERTIES = "TASK_PROPERTIES"; | |
| 14 | - | |
| 15 | - /** 默认 */ | |
| 16 | - public static final String MISFIRE_DEFAULT = "0"; | |
| 17 | - | |
| 18 | - /** 立即触发执行 */ | |
| 19 | - public static final String MISFIRE_IGNORE_MISFIRES = "1"; | |
| 20 | - | |
| 21 | - /** 触发一次执行 */ | |
| 22 | - public static final String MISFIRE_FIRE_AND_PROCEED = "2"; | |
| 23 | - | |
| 24 | - /** 不触发立即执行 */ | |
| 25 | - public static final String MISFIRE_DO_NOTHING = "3"; | |
| 26 | - | |
| 27 | - public enum Status | |
| 28 | - { | |
| 29 | - /** | |
| 30 | - * 正常 | |
| 31 | - */ | |
| 32 | - NORMAL("0"), | |
| 33 | - /** | |
| 34 | - * 暂停 | |
| 35 | - */ | |
| 36 | - PAUSE("1"); | |
| 37 | - | |
| 38 | - private String value; | |
| 39 | - | |
| 40 | - private Status(String value) | |
| 41 | - { | |
| 42 | - this.value = value; | |
| 43 | - } | |
| 44 | - | |
| 45 | - public String getValue() | |
| 46 | - { | |
| 47 | - return value; | |
| 48 | - } | |
| 49 | - } | |
| 50 | -} | |
| 1 | +package com.ruoyi.common.constant; | |
| 2 | + | |
| 3 | +/** | |
| 4 | + * 任务调度通用常量 | |
| 5 | + * | |
| 6 | + * @author ruoyi | |
| 7 | + */ | |
| 8 | +public class ScheduleConstants | |
| 9 | +{ | |
| 10 | + public static final String TASK_CLASS_NAME = "TASK_CLASS_NAME"; | |
| 11 | + | |
| 12 | + /** 执行目标key */ | |
| 13 | + public static final String TASK_PROPERTIES = "TASK_PROPERTIES"; | |
| 14 | + | |
| 15 | + /** 默认 */ | |
| 16 | + public static final String MISFIRE_DEFAULT = "0"; | |
| 17 | + | |
| 18 | + /** 立即触发执行 */ | |
| 19 | + public static final String MISFIRE_IGNORE_MISFIRES = "1"; | |
| 20 | + | |
| 21 | + /** 触发一次执行 */ | |
| 22 | + public static final String MISFIRE_FIRE_AND_PROCEED = "2"; | |
| 23 | + | |
| 24 | + /** 不触发立即执行 */ | |
| 25 | + public static final String MISFIRE_DO_NOTHING = "3"; | |
| 26 | + | |
| 27 | + public enum Status | |
| 28 | + { | |
| 29 | + /** | |
| 30 | + * 正常 | |
| 31 | + */ | |
| 32 | + NORMAL("0"), | |
| 33 | + /** | |
| 34 | + * 暂停 | |
| 35 | + */ | |
| 36 | + PAUSE("1"); | |
| 37 | + | |
| 38 | + private String value; | |
| 39 | + | |
| 40 | + private Status(String value) | |
| 41 | + { | |
| 42 | + this.value = value; | |
| 43 | + } | |
| 44 | + | |
| 45 | + public String getValue() | |
| 46 | + { | |
| 47 | + return value; | |
| 48 | + } | |
| 49 | + } | |
| 50 | +} | ... | ... |
ruoyi/src/main/java/com/ruoyi/common/constant/UserConstants.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/constant/UserConstants.java
ruoyi/src/main/java/com/ruoyi/framework/web/controller/BaseController.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/core/controller/BaseController.java
| 1 | -package com.ruoyi.framework.web.controller; | |
| 1 | +package com.ruoyi.common.core.controller; | |
| 2 | 2 | |
| 3 | 3 | import java.beans.PropertyEditorSupport; |
| 4 | 4 | import java.util.Date; |
| ... | ... | @@ -10,13 +10,13 @@ import org.springframework.web.bind.annotation.InitBinder; |
| 10 | 10 | import com.github.pagehelper.PageHelper; |
| 11 | 11 | import com.github.pagehelper.PageInfo; |
| 12 | 12 | import com.ruoyi.common.constant.HttpStatus; |
| 13 | +import com.ruoyi.common.core.domain.AjaxResult; | |
| 14 | +import com.ruoyi.common.core.page.PageDomain; | |
| 15 | +import com.ruoyi.common.core.page.TableDataInfo; | |
| 16 | +import com.ruoyi.common.core.page.TableSupport; | |
| 13 | 17 | import com.ruoyi.common.utils.DateUtils; |
| 14 | 18 | import com.ruoyi.common.utils.StringUtils; |
| 15 | 19 | import com.ruoyi.common.utils.sql.SqlUtil; |
| 16 | -import com.ruoyi.framework.web.domain.AjaxResult; | |
| 17 | -import com.ruoyi.framework.web.page.PageDomain; | |
| 18 | -import com.ruoyi.framework.web.page.TableDataInfo; | |
| 19 | -import com.ruoyi.framework.web.page.TableSupport; | |
| 20 | 20 | |
| 21 | 21 | /** |
| 22 | 22 | * web层通用数据处理 |
| ... | ... | @@ -83,4 +83,12 @@ public class BaseController |
| 83 | 83 | { |
| 84 | 84 | return rows > 0 ? AjaxResult.success() : AjaxResult.error(); |
| 85 | 85 | } |
| 86 | + | |
| 87 | + /** | |
| 88 | + * 页面跳转 | |
| 89 | + */ | |
| 90 | + public String redirect(String url) | |
| 91 | + { | |
| 92 | + return StringUtils.format("redirect:{}", url); | |
| 93 | + } | |
| 86 | 94 | } | ... | ... |
ruoyi/src/main/java/com/ruoyi/framework/web/domain/AjaxResult.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/core/domain/AjaxResult.java
ruoyi/src/main/java/com/ruoyi/framework/web/domain/BaseEntity.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseEntity.java
ruoyi/src/main/java/com/ruoyi/framework/web/domain/TreeEntity.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/core/domain/TreeEntity.java
ruoyi/src/main/java/com/ruoyi/framework/web/domain/TreeSelect.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/core/domain/TreeSelect.java
| 1 | -package com.ruoyi.framework.web.domain; | |
| 1 | +package com.ruoyi.common.core.domain; | |
| 2 | 2 | |
| 3 | 3 | import java.io.Serializable; |
| 4 | 4 | import java.util.List; |
| 5 | 5 | import java.util.stream.Collectors; |
| 6 | 6 | import com.fasterxml.jackson.annotation.JsonInclude; |
| 7 | -import com.ruoyi.project.system.domain.SysDept; | |
| 8 | -import com.ruoyi.project.system.domain.SysMenu; | |
| 7 | +import com.ruoyi.common.core.domain.entity.SysDept; | |
| 8 | +import com.ruoyi.common.core.domain.entity.SysMenu; | |
| 9 | 9 | |
| 10 | 10 | /** |
| 11 | 11 | * Treeselect树结构实体类 | ... | ... |
ruoyi/src/main/java/com/ruoyi/project/system/domain/SysDept.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java
| 1 | -package com.ruoyi.project.system.domain; | |
| 1 | +package com.ruoyi.common.core.domain.entity; | |
| 2 | 2 | |
| 3 | 3 | import java.util.ArrayList; |
| 4 | 4 | import java.util.List; |
| ... | ... | @@ -7,7 +7,7 @@ import javax.validation.constraints.NotBlank; |
| 7 | 7 | import javax.validation.constraints.Size; |
| 8 | 8 | import org.apache.commons.lang3.builder.ToStringBuilder; |
| 9 | 9 | import org.apache.commons.lang3.builder.ToStringStyle; |
| 10 | -import com.ruoyi.framework.web.domain.BaseEntity; | |
| 10 | +import com.ruoyi.common.core.domain.BaseEntity; | |
| 11 | 11 | |
| 12 | 12 | /** |
| 13 | 13 | * 部门表 sys_dept | ... | ... |
ruoyi/src/main/java/com/ruoyi/project/system/domain/SysDictData.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictData.java
| 1 | -package com.ruoyi.project.system.domain; | |
| 1 | +package com.ruoyi.common.core.domain.entity; | |
| 2 | 2 | |
| 3 | 3 | import javax.validation.constraints.NotBlank; |
| 4 | 4 | import javax.validation.constraints.Size; |
| 5 | 5 | import org.apache.commons.lang3.builder.ToStringBuilder; |
| 6 | 6 | import org.apache.commons.lang3.builder.ToStringStyle; |
| 7 | +import com.ruoyi.common.annotation.Excel; | |
| 8 | +import com.ruoyi.common.annotation.Excel.ColumnType; | |
| 7 | 9 | import com.ruoyi.common.constant.UserConstants; |
| 8 | -import com.ruoyi.framework.aspectj.lang.annotation.Excel; | |
| 9 | -import com.ruoyi.framework.aspectj.lang.annotation.Excel.ColumnType; | |
| 10 | -import com.ruoyi.framework.web.domain.BaseEntity; | |
| 10 | +import com.ruoyi.common.core.domain.BaseEntity; | |
| 11 | 11 | |
| 12 | 12 | /** |
| 13 | 13 | * 字典数据表 sys_dict_data | ... | ... |
ruoyi/src/main/java/com/ruoyi/project/system/domain/SysDictType.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictType.java
| 1 | -package com.ruoyi.project.system.domain; | |
| 1 | +package com.ruoyi.common.core.domain.entity; | |
| 2 | 2 | |
| 3 | 3 | import javax.validation.constraints.NotBlank; |
| 4 | 4 | import javax.validation.constraints.Size; |
| 5 | 5 | import org.apache.commons.lang3.builder.ToStringBuilder; |
| 6 | 6 | import org.apache.commons.lang3.builder.ToStringStyle; |
| 7 | -import com.ruoyi.framework.aspectj.lang.annotation.Excel; | |
| 8 | -import com.ruoyi.framework.aspectj.lang.annotation.Excel.ColumnType; | |
| 9 | -import com.ruoyi.framework.web.domain.BaseEntity; | |
| 7 | +import com.ruoyi.common.annotation.Excel; | |
| 8 | +import com.ruoyi.common.annotation.Excel.ColumnType; | |
| 9 | +import com.ruoyi.common.core.domain.BaseEntity; | |
| 10 | 10 | |
| 11 | 11 | /** |
| 12 | 12 | * 字典类型表 sys_dict_type | ... | ... |
ruoyi/src/main/java/com/ruoyi/project/system/domain/SysMenu.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java
| 1 | -package com.ruoyi.project.system.domain; | |
| 1 | +package com.ruoyi.common.core.domain.entity; | |
| 2 | 2 | |
| 3 | 3 | import java.util.ArrayList; |
| 4 | 4 | import java.util.List; |
| ... | ... | @@ -6,7 +6,7 @@ import javax.validation.constraints.NotBlank; |
| 6 | 6 | import javax.validation.constraints.Size; |
| 7 | 7 | import org.apache.commons.lang3.builder.ToStringBuilder; |
| 8 | 8 | import org.apache.commons.lang3.builder.ToStringStyle; |
| 9 | -import com.ruoyi.framework.web.domain.BaseEntity; | |
| 9 | +import com.ruoyi.common.core.domain.BaseEntity; | |
| 10 | 10 | |
| 11 | 11 | /** |
| 12 | 12 | * 菜单权限表 sys_menu | ... | ... |
ruoyi/src/main/java/com/ruoyi/project/system/domain/SysRole.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java
| 1 | -package com.ruoyi.project.system.domain; | |
| 1 | +package com.ruoyi.common.core.domain.entity; | |
| 2 | 2 | |
| 3 | 3 | import javax.validation.constraints.NotBlank; |
| 4 | 4 | import javax.validation.constraints.Size; |
| 5 | 5 | import org.apache.commons.lang3.builder.ToStringBuilder; |
| 6 | 6 | import org.apache.commons.lang3.builder.ToStringStyle; |
| 7 | -import com.ruoyi.framework.aspectj.lang.annotation.Excel; | |
| 8 | -import com.ruoyi.framework.aspectj.lang.annotation.Excel.ColumnType; | |
| 9 | -import com.ruoyi.framework.web.domain.BaseEntity; | |
| 7 | +import com.ruoyi.common.annotation.Excel; | |
| 8 | +import com.ruoyi.common.annotation.Excel.ColumnType; | |
| 9 | +import com.ruoyi.common.core.domain.BaseEntity; | |
| 10 | 10 | |
| 11 | 11 | /** |
| 12 | 12 | * 角色表 sys_role | ... | ... |
ruoyi/src/main/java/com/ruoyi/project/system/domain/SysUser.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java
| 1 | -package com.ruoyi.project.system.domain; | |
| 1 | +package com.ruoyi.common.core.domain.entity; | |
| 2 | 2 | |
| 3 | 3 | import java.util.Date; |
| 4 | 4 | import java.util.List; |
| ... | ... | @@ -9,11 +9,11 @@ import org.apache.commons.lang3.builder.ToStringBuilder; |
| 9 | 9 | import org.apache.commons.lang3.builder.ToStringStyle; |
| 10 | 10 | import com.fasterxml.jackson.annotation.JsonIgnore; |
| 11 | 11 | import com.fasterxml.jackson.annotation.JsonProperty; |
| 12 | -import com.ruoyi.framework.aspectj.lang.annotation.Excel; | |
| 13 | -import com.ruoyi.framework.aspectj.lang.annotation.Excel.ColumnType; | |
| 14 | -import com.ruoyi.framework.aspectj.lang.annotation.Excel.Type; | |
| 15 | -import com.ruoyi.framework.aspectj.lang.annotation.Excels; | |
| 16 | -import com.ruoyi.framework.web.domain.BaseEntity; | |
| 12 | +import com.ruoyi.common.annotation.Excel; | |
| 13 | +import com.ruoyi.common.annotation.Excel.ColumnType; | |
| 14 | +import com.ruoyi.common.annotation.Excel.Type; | |
| 15 | +import com.ruoyi.common.annotation.Excels; | |
| 16 | +import com.ruoyi.common.core.domain.BaseEntity; | |
| 17 | 17 | |
| 18 | 18 | /** |
| 19 | 19 | * 用户对象 sys_user | ... | ... |
ruoyi/src/main/java/com/ruoyi/framework/security/LoginBody.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/LoginBody.java
ruoyi/src/main/java/com/ruoyi/framework/security/LoginUser.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/LoginUser.java
| 1 | -package com.ruoyi.framework.security; | |
| 1 | +package com.ruoyi.common.core.domain.model; | |
| 2 | 2 | |
| 3 | 3 | import java.util.Collection; |
| 4 | 4 | import java.util.Set; |
| 5 | 5 | import org.springframework.security.core.GrantedAuthority; |
| 6 | 6 | import org.springframework.security.core.userdetails.UserDetails; |
| 7 | 7 | import com.fasterxml.jackson.annotation.JsonIgnore; |
| 8 | -import com.ruoyi.project.system.domain.SysUser; | |
| 8 | +import com.ruoyi.common.core.domain.entity.SysUser; | |
| 9 | 9 | |
| 10 | 10 | /** |
| 11 | 11 | * 登录用户身份权限 | ... | ... |
ruoyi/src/main/java/com/ruoyi/framework/web/page/PageDomain.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/core/page/PageDomain.java
| 1 | -package com.ruoyi.framework.web.page; | |
| 1 | +package com.ruoyi.common.core.page; | |
| 2 | 2 | |
| 3 | 3 | import com.ruoyi.common.utils.StringUtils; |
| 4 | 4 | |
| ... | ... | @@ -11,10 +11,13 @@ public class PageDomain |
| 11 | 11 | { |
| 12 | 12 | /** 当前记录起始索引 */ |
| 13 | 13 | private Integer pageNum; |
| 14 | + | |
| 14 | 15 | /** 每页显示记录数 */ |
| 15 | 16 | private Integer pageSize; |
| 17 | + | |
| 16 | 18 | /** 排序列 */ |
| 17 | 19 | private String orderByColumn; |
| 20 | + | |
| 18 | 21 | /** 排序的方向 "desc" 或者 "asc". */ |
| 19 | 22 | private String isAsc; |
| 20 | 23 | ... | ... |
ruoyi/src/main/java/com/ruoyi/framework/web/page/TableDataInfo.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/core/page/TableDataInfo.java
| 1 | -package com.ruoyi.framework.web.page; | |
| 1 | +package com.ruoyi.common.core.page; | |
| 2 | 2 | |
| 3 | 3 | import java.io.Serializable; |
| 4 | 4 | import java.util.List; |
| ... | ... | @@ -82,4 +82,4 @@ public class TableDataInfo implements Serializable |
| 82 | 82 | { |
| 83 | 83 | this.msg = msg; |
| 84 | 84 | } |
| 85 | -} | |
| 86 | 85 | \ No newline at end of file |
| 86 | +} | ... | ... |
ruoyi/src/main/java/com/ruoyi/framework/web/page/TableSupport.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/core/page/TableSupport.java
ruoyi/src/main/java/com/ruoyi/framework/redis/RedisCache.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java
ruoyi/src/main/java/com/ruoyi/common/core/text/CharsetKit.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/core/text/CharsetKit.java
ruoyi/src/main/java/com/ruoyi/common/core/text/Convert.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/core/text/Convert.java
ruoyi/src/main/java/com/ruoyi/common/core/text/StrFormatter.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/core/text/StrFormatter.java
ruoyi/src/main/java/com/ruoyi/framework/aspectj/lang/enums/BusinessStatus.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/enums/BusinessStatus.java
ruoyi/src/main/java/com/ruoyi/framework/aspectj/lang/enums/BusinessType.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/enums/BusinessType.java
ruoyi/src/main/java/com/ruoyi/framework/aspectj/lang/enums/DataSourceType.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/enums/DataSourceType.java
ruoyi/src/main/java/com/ruoyi/common/enums/HttpMethod.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/enums/HttpMethod.java
ruoyi/src/main/java/com/ruoyi/framework/aspectj/lang/enums/OperatorType.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/enums/OperatorType.java
ruoyi/src/main/java/com/ruoyi/common/enums/UserStatus.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/enums/UserStatus.java
ruoyi/src/main/java/com/ruoyi/common/exception/BaseException.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/exception/BaseException.java
ruoyi/src/main/java/com/ruoyi/common/exception/CustomException.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/exception/CustomException.java
ruoyi/src/main/java/com/ruoyi/common/exception/DemoModeException.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/exception/DemoModeException.java
ruoyi/src/main/java/com/ruoyi/common/exception/UtilException.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/exception/UtilException.java
ruoyi/src/main/java/com/ruoyi/common/exception/file/FileException.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/exception/file/FileException.java
ruoyi/src/main/java/com/ruoyi/common/exception/file/FileNameLengthLimitExceededException.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/exception/file/FileNameLengthLimitExceededException.java
ruoyi/src/main/java/com/ruoyi/common/exception/file/FileSizeLimitExceededException.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/exception/file/FileSizeLimitExceededException.java
ruoyi/src/main/java/com/ruoyi/common/exception/file/InvalidExtensionException.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/exception/file/InvalidExtensionException.java
ruoyi/src/main/java/com/ruoyi/common/exception/job/TaskException.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/exception/job/TaskException.java
| 1 | -package com.ruoyi.common.exception.job; | |
| 2 | - | |
| 3 | -/** | |
| 4 | - * 计划策略异常 | |
| 5 | - * | |
| 6 | - * @author ruoyi | |
| 7 | - */ | |
| 8 | -public class TaskException extends Exception | |
| 9 | -{ | |
| 10 | - private static final long serialVersionUID = 1L; | |
| 11 | - | |
| 12 | - private Code code; | |
| 13 | - | |
| 14 | - public TaskException(String msg, Code code) | |
| 15 | - { | |
| 16 | - this(msg, code, null); | |
| 17 | - } | |
| 18 | - | |
| 19 | - public TaskException(String msg, Code code, Exception nestedEx) | |
| 20 | - { | |
| 21 | - super(msg, nestedEx); | |
| 22 | - this.code = code; | |
| 23 | - } | |
| 24 | - | |
| 25 | - public Code getCode() | |
| 26 | - { | |
| 27 | - return code; | |
| 28 | - } | |
| 29 | - | |
| 30 | - public enum Code | |
| 31 | - { | |
| 32 | - TASK_EXISTS, NO_TASK_EXISTS, TASK_ALREADY_STARTED, UNKNOWN, CONFIG_ERROR, TASK_NODE_NOT_AVAILABLE | |
| 33 | - } | |
| 1 | +package com.ruoyi.common.exception.job; | |
| 2 | + | |
| 3 | +/** | |
| 4 | + * 计划策略异常 | |
| 5 | + * | |
| 6 | + * @author ruoyi | |
| 7 | + */ | |
| 8 | +public class TaskException extends Exception | |
| 9 | +{ | |
| 10 | + private static final long serialVersionUID = 1L; | |
| 11 | + | |
| 12 | + private Code code; | |
| 13 | + | |
| 14 | + public TaskException(String msg, Code code) | |
| 15 | + { | |
| 16 | + this(msg, code, null); | |
| 17 | + } | |
| 18 | + | |
| 19 | + public TaskException(String msg, Code code, Exception nestedEx) | |
| 20 | + { | |
| 21 | + super(msg, nestedEx); | |
| 22 | + this.code = code; | |
| 23 | + } | |
| 24 | + | |
| 25 | + public Code getCode() | |
| 26 | + { | |
| 27 | + return code; | |
| 28 | + } | |
| 29 | + | |
| 30 | + public enum Code | |
| 31 | + { | |
| 32 | + TASK_EXISTS, NO_TASK_EXISTS, TASK_ALREADY_STARTED, UNKNOWN, CONFIG_ERROR, TASK_NODE_NOT_AVAILABLE | |
| 33 | + } | |
| 34 | 34 | } |
| 35 | 35 | \ No newline at end of file | ... | ... |
ruoyi/src/main/java/com/ruoyi/common/exception/user/CaptchaException.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/exception/user/CaptchaException.java
ruoyi/src/main/java/com/ruoyi/common/exception/user/CaptchaExpireException.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/exception/user/CaptchaExpireException.java
ruoyi/src/main/java/com/ruoyi/common/exception/user/UserException.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/exception/user/UserException.java
ruoyi/src/main/java/com/ruoyi/common/exception/user/UserPasswordNotMatchException.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/exception/user/UserPasswordNotMatchException.java
ruoyi/src/main/java/com/ruoyi/common/filter/RepeatableFilter.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/filter/RepeatableFilter.java
| 1 | -package com.ruoyi.common.filter; | |
| 2 | - | |
| 3 | -import java.io.IOException; | |
| 4 | -import javax.servlet.Filter; | |
| 5 | -import javax.servlet.FilterChain; | |
| 6 | -import javax.servlet.FilterConfig; | |
| 7 | -import javax.servlet.ServletException; | |
| 8 | -import javax.servlet.ServletRequest; | |
| 9 | -import javax.servlet.ServletResponse; | |
| 10 | -import javax.servlet.http.HttpServletRequest; | |
| 11 | -import org.springframework.http.MediaType; | |
| 12 | -import com.ruoyi.common.utils.StringUtils; | |
| 13 | - | |
| 14 | -/** | |
| 15 | - * Repeatable 过滤器 | |
| 16 | - * | |
| 17 | - * @author ruoyi | |
| 18 | - */ | |
| 19 | -public class RepeatableFilter implements Filter | |
| 20 | -{ | |
| 21 | - @Override | |
| 22 | - public void init(FilterConfig filterConfig) throws ServletException | |
| 23 | - { | |
| 24 | - | |
| 25 | - } | |
| 26 | - | |
| 27 | - @Override | |
| 28 | - public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) | |
| 29 | - throws IOException, ServletException | |
| 30 | - { | |
| 31 | - ServletRequest requestWrapper = null; | |
| 32 | - if (request instanceof HttpServletRequest && StringUtils.equalsAnyIgnoreCase(request.getContentType(), | |
| 33 | - MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_JSON_UTF8_VALUE)) | |
| 34 | - { | |
| 35 | - requestWrapper = new RepeatedlyRequestWrapper((HttpServletRequest) request, response); | |
| 36 | - } | |
| 37 | - if (null == requestWrapper) | |
| 38 | - { | |
| 39 | - chain.doFilter(request, response); | |
| 40 | - } | |
| 41 | - else | |
| 42 | - { | |
| 43 | - chain.doFilter(requestWrapper, response); | |
| 44 | - } | |
| 45 | - } | |
| 46 | - | |
| 47 | - @Override | |
| 48 | - public void destroy() | |
| 49 | - { | |
| 50 | - | |
| 51 | - } | |
| 52 | -} | |
| 1 | +package com.ruoyi.common.filter; | |
| 2 | + | |
| 3 | +import java.io.IOException; | |
| 4 | +import javax.servlet.Filter; | |
| 5 | +import javax.servlet.FilterChain; | |
| 6 | +import javax.servlet.FilterConfig; | |
| 7 | +import javax.servlet.ServletException; | |
| 8 | +import javax.servlet.ServletRequest; | |
| 9 | +import javax.servlet.ServletResponse; | |
| 10 | +import javax.servlet.http.HttpServletRequest; | |
| 11 | +import org.springframework.http.MediaType; | |
| 12 | +import com.ruoyi.common.utils.StringUtils; | |
| 13 | + | |
| 14 | +/** | |
| 15 | + * Repeatable 过滤器 | |
| 16 | + * | |
| 17 | + * @author ruoyi | |
| 18 | + */ | |
| 19 | +public class RepeatableFilter implements Filter | |
| 20 | +{ | |
| 21 | + @Override | |
| 22 | + public void init(FilterConfig filterConfig) throws ServletException | |
| 23 | + { | |
| 24 | + | |
| 25 | + } | |
| 26 | + | |
| 27 | + @Override | |
| 28 | + public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) | |
| 29 | + throws IOException, ServletException | |
| 30 | + { | |
| 31 | + ServletRequest requestWrapper = null; | |
| 32 | + if (request instanceof HttpServletRequest && StringUtils.equalsAnyIgnoreCase(request.getContentType(), | |
| 33 | + MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_JSON_UTF8_VALUE)) | |
| 34 | + { | |
| 35 | + requestWrapper = new RepeatedlyRequestWrapper((HttpServletRequest) request, response); | |
| 36 | + } | |
| 37 | + if (null == requestWrapper) | |
| 38 | + { | |
| 39 | + chain.doFilter(request, response); | |
| 40 | + } | |
| 41 | + else | |
| 42 | + { | |
| 43 | + chain.doFilter(requestWrapper, response); | |
| 44 | + } | |
| 45 | + } | |
| 46 | + | |
| 47 | + @Override | |
| 48 | + public void destroy() | |
| 49 | + { | |
| 50 | + | |
| 51 | + } | |
| 52 | +} | ... | ... |
ruoyi/src/main/java/com/ruoyi/common/filter/RepeatedlyRequestWrapper.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/filter/RepeatedlyRequestWrapper.java
| 1 | -package com.ruoyi.common.filter; | |
| 2 | - | |
| 3 | -import java.io.BufferedReader; | |
| 4 | -import java.io.ByteArrayInputStream; | |
| 5 | -import java.io.IOException; | |
| 6 | -import java.io.InputStreamReader; | |
| 7 | -import javax.servlet.ReadListener; | |
| 8 | -import javax.servlet.ServletInputStream; | |
| 9 | -import javax.servlet.ServletResponse; | |
| 10 | -import javax.servlet.http.HttpServletRequest; | |
| 11 | -import javax.servlet.http.HttpServletRequestWrapper; | |
| 12 | -import com.ruoyi.common.utils.http.HttpHelper; | |
| 13 | - | |
| 14 | -/** | |
| 15 | - * 构建可重复读取inputStream的request | |
| 16 | - * | |
| 17 | - * @author ruoyi | |
| 18 | - */ | |
| 19 | -public class RepeatedlyRequestWrapper extends HttpServletRequestWrapper | |
| 20 | -{ | |
| 21 | - private final byte[] body; | |
| 22 | - | |
| 23 | - public RepeatedlyRequestWrapper(HttpServletRequest request, ServletResponse response) throws IOException | |
| 24 | - { | |
| 25 | - super(request); | |
| 26 | - request.setCharacterEncoding("UTF-8"); | |
| 27 | - response.setCharacterEncoding("UTF-8"); | |
| 28 | - | |
| 29 | - body = HttpHelper.getBodyString(request).getBytes("UTF-8"); | |
| 30 | - } | |
| 31 | - | |
| 32 | - @Override | |
| 33 | - public BufferedReader getReader() throws IOException | |
| 34 | - { | |
| 35 | - return new BufferedReader(new InputStreamReader(getInputStream())); | |
| 36 | - } | |
| 37 | - | |
| 38 | - @Override | |
| 39 | - public ServletInputStream getInputStream() throws IOException | |
| 40 | - { | |
| 41 | - | |
| 42 | - final ByteArrayInputStream bais = new ByteArrayInputStream(body); | |
| 43 | - | |
| 44 | - return new ServletInputStream() | |
| 45 | - { | |
| 46 | - | |
| 47 | - @Override | |
| 48 | - public int read() throws IOException | |
| 49 | - { | |
| 50 | - return bais.read(); | |
| 51 | - } | |
| 52 | - | |
| 53 | - @Override | |
| 54 | - public boolean isFinished() | |
| 55 | - { | |
| 56 | - return false; | |
| 57 | - } | |
| 58 | - | |
| 59 | - @Override | |
| 60 | - public boolean isReady() | |
| 61 | - { | |
| 62 | - return false; | |
| 63 | - } | |
| 64 | - | |
| 65 | - @Override | |
| 66 | - public void setReadListener(ReadListener readListener) | |
| 67 | - { | |
| 68 | - | |
| 69 | - } | |
| 70 | - }; | |
| 71 | - } | |
| 72 | -} | |
| 1 | +package com.ruoyi.common.filter; | |
| 2 | + | |
| 3 | +import java.io.BufferedReader; | |
| 4 | +import java.io.ByteArrayInputStream; | |
| 5 | +import java.io.IOException; | |
| 6 | +import java.io.InputStreamReader; | |
| 7 | +import javax.servlet.ReadListener; | |
| 8 | +import javax.servlet.ServletInputStream; | |
| 9 | +import javax.servlet.ServletResponse; | |
| 10 | +import javax.servlet.http.HttpServletRequest; | |
| 11 | +import javax.servlet.http.HttpServletRequestWrapper; | |
| 12 | +import com.ruoyi.common.utils.http.HttpHelper; | |
| 13 | + | |
| 14 | +/** | |
| 15 | + * 构建可重复读取inputStream的request | |
| 16 | + * | |
| 17 | + * @author ruoyi | |
| 18 | + */ | |
| 19 | +public class RepeatedlyRequestWrapper extends HttpServletRequestWrapper | |
| 20 | +{ | |
| 21 | + private final byte[] body; | |
| 22 | + | |
| 23 | + public RepeatedlyRequestWrapper(HttpServletRequest request, ServletResponse response) throws IOException | |
| 24 | + { | |
| 25 | + super(request); | |
| 26 | + request.setCharacterEncoding("UTF-8"); | |
| 27 | + response.setCharacterEncoding("UTF-8"); | |
| 28 | + | |
| 29 | + body = HttpHelper.getBodyString(request).getBytes("UTF-8"); | |
| 30 | + } | |
| 31 | + | |
| 32 | + @Override | |
| 33 | + public BufferedReader getReader() throws IOException | |
| 34 | + { | |
| 35 | + return new BufferedReader(new InputStreamReader(getInputStream())); | |
| 36 | + } | |
| 37 | + | |
| 38 | + @Override | |
| 39 | + public ServletInputStream getInputStream() throws IOException | |
| 40 | + { | |
| 41 | + | |
| 42 | + final ByteArrayInputStream bais = new ByteArrayInputStream(body); | |
| 43 | + | |
| 44 | + return new ServletInputStream() | |
| 45 | + { | |
| 46 | + | |
| 47 | + @Override | |
| 48 | + public int read() throws IOException | |
| 49 | + { | |
| 50 | + return bais.read(); | |
| 51 | + } | |
| 52 | + | |
| 53 | + @Override | |
| 54 | + public boolean isFinished() | |
| 55 | + { | |
| 56 | + return false; | |
| 57 | + } | |
| 58 | + | |
| 59 | + @Override | |
| 60 | + public boolean isReady() | |
| 61 | + { | |
| 62 | + return false; | |
| 63 | + } | |
| 64 | + | |
| 65 | + @Override | |
| 66 | + public void setReadListener(ReadListener readListener) | |
| 67 | + { | |
| 68 | + | |
| 69 | + } | |
| 70 | + }; | |
| 71 | + } | |
| 72 | +} | ... | ... |
ruoyi/src/main/java/com/ruoyi/common/filter/XssFilter.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/filter/XssFilter.java
ruoyi/src/main/java/com/ruoyi/common/filter/XssHttpServletRequestWrapper.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/filter/XssHttpServletRequestWrapper.java
ruoyi/src/main/java/com/ruoyi/common/utils/Arith.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/utils/Arith.java
ruoyi/src/main/java/com/ruoyi/common/utils/DateUtils.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/utils/DateUtils.java
ruoyi/src/main/java/com/ruoyi/common/utils/DictUtils.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/utils/DictUtils.java
| ... | ... | @@ -2,10 +2,11 @@ package com.ruoyi.common.utils; |
| 2 | 2 | |
| 3 | 3 | import java.util.Collection; |
| 4 | 4 | import java.util.List; |
| 5 | + | |
| 5 | 6 | import com.ruoyi.common.constant.Constants; |
| 7 | +import com.ruoyi.common.core.domain.entity.SysDictData; | |
| 8 | +import com.ruoyi.common.core.redis.RedisCache; | |
| 6 | 9 | import com.ruoyi.common.utils.spring.SpringUtils; |
| 7 | -import com.ruoyi.framework.redis.RedisCache; | |
| 8 | -import com.ruoyi.project.system.domain.SysDictData; | |
| 9 | 10 | |
| 10 | 11 | /** |
| 11 | 12 | * 字典工具类 | ... | ... |
ruoyi/src/main/java/com/ruoyi/common/utils/ExceptionUtil.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/utils/ExceptionUtil.java
| 1 | -package com.ruoyi.common.utils; | |
| 2 | - | |
| 3 | -import java.io.PrintWriter; | |
| 4 | -import java.io.StringWriter; | |
| 5 | -import org.apache.commons.lang3.exception.ExceptionUtils; | |
| 6 | - | |
| 7 | -/** | |
| 8 | - * 错误信息处理类。 | |
| 9 | - * | |
| 10 | - * @author ruoyi | |
| 11 | - */ | |
| 12 | -public class ExceptionUtil | |
| 13 | -{ | |
| 14 | - /** | |
| 15 | - * 获取exception的详细错误信息。 | |
| 16 | - */ | |
| 17 | - public static String getExceptionMessage(Throwable e) | |
| 18 | - { | |
| 19 | - StringWriter sw = new StringWriter(); | |
| 20 | - e.printStackTrace(new PrintWriter(sw, true)); | |
| 21 | - String str = sw.toString(); | |
| 22 | - return str; | |
| 23 | - } | |
| 24 | - | |
| 25 | - public static String getRootErrorMseeage(Exception e) | |
| 26 | - { | |
| 27 | - Throwable root = ExceptionUtils.getRootCause(e); | |
| 28 | - root = (root == null ? e : root); | |
| 29 | - if (root == null) | |
| 30 | - { | |
| 31 | - return ""; | |
| 32 | - } | |
| 33 | - String msg = root.getMessage(); | |
| 34 | - if (msg == null) | |
| 35 | - { | |
| 36 | - return "null"; | |
| 37 | - } | |
| 38 | - return StringUtils.defaultString(msg); | |
| 39 | - } | |
| 40 | -} | |
| 1 | +package com.ruoyi.common.utils; | |
| 2 | + | |
| 3 | +import java.io.PrintWriter; | |
| 4 | +import java.io.StringWriter; | |
| 5 | +import org.apache.commons.lang3.exception.ExceptionUtils; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * 错误信息处理类。 | |
| 9 | + * | |
| 10 | + * @author ruoyi | |
| 11 | + */ | |
| 12 | +public class ExceptionUtil | |
| 13 | +{ | |
| 14 | + /** | |
| 15 | + * 获取exception的详细错误信息。 | |
| 16 | + */ | |
| 17 | + public static String getExceptionMessage(Throwable e) | |
| 18 | + { | |
| 19 | + StringWriter sw = new StringWriter(); | |
| 20 | + e.printStackTrace(new PrintWriter(sw, true)); | |
| 21 | + String str = sw.toString(); | |
| 22 | + return str; | |
| 23 | + } | |
| 24 | + | |
| 25 | + public static String getRootErrorMseeage(Exception e) | |
| 26 | + { | |
| 27 | + Throwable root = ExceptionUtils.getRootCause(e); | |
| 28 | + root = (root == null ? e : root); | |
| 29 | + if (root == null) | |
| 30 | + { | |
| 31 | + return ""; | |
| 32 | + } | |
| 33 | + String msg = root.getMessage(); | |
| 34 | + if (msg == null) | |
| 35 | + { | |
| 36 | + return "null"; | |
| 37 | + } | |
| 38 | + return StringUtils.defaultString(msg); | |
| 39 | + } | |
| 40 | +} | ... | ... |
ruoyi/src/main/java/com/ruoyi/common/utils/LogUtils.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/utils/LogUtils.java
ruoyi/src/main/java/com/ruoyi/common/utils/MessageUtils.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/utils/MessageUtils.java
ruoyi/src/main/java/com/ruoyi/common/utils/SecurityUtils.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/utils/SecurityUtils.java
| ... | ... | @@ -4,8 +4,8 @@ import org.springframework.security.core.Authentication; |
| 4 | 4 | import org.springframework.security.core.context.SecurityContextHolder; |
| 5 | 5 | import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; |
| 6 | 6 | import com.ruoyi.common.constant.HttpStatus; |
| 7 | +import com.ruoyi.common.core.domain.model.LoginUser; | |
| 7 | 8 | import com.ruoyi.common.exception.CustomException; |
| 8 | -import com.ruoyi.framework.security.LoginUser; | |
| 9 | 9 | |
| 10 | 10 | /** |
| 11 | 11 | * 安全服务工具类 | ... | ... |
ruoyi/src/main/java/com/ruoyi/common/utils/ServletUtils.java renamed to ruoyi-common/src/main/java/com/ruoyi/common/utils/ServletUtils.java