正在显示
100 个修改的文件
包含
1097 行增加
和
349 行删除
bin/run.bat
0 → 100644
doc/若依环境使用手册.docx
0 → 100644
不能预览此文件类型
| 1 | <?xml version="1.0" encoding="UTF-8"?> | 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" | 2 | +<project xmlns="http://maven.apache.org/POM/4.0.0" |
| 3 | + 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"> | 4 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| 4 | <modelVersion>4.0.0</modelVersion> | 5 | <modelVersion>4.0.0</modelVersion> |
| 5 | 6 | ||
| 6 | <groupId>com.ruoyi</groupId> | 7 | <groupId>com.ruoyi</groupId> |
| 7 | <artifactId>ruoyi</artifactId> | 8 | <artifactId>ruoyi</artifactId> |
| 8 | - <version>2.3.0</version> | ||
| 9 | - <packaging>jar</packaging> | 9 | + <version>3.0.0</version> |
| 10 | 10 | ||
| 11 | <name>ruoyi</name> | 11 | <name>ruoyi</name> |
| 12 | <url>http://www.ruoyi.vip</url> | 12 | <url>http://www.ruoyi.vip</url> |
| 13 | <description>若依管理系统</description> | 13 | <description>若依管理系统</description> |
| 14 | 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> | 15 | <properties> |
| 16 | + <ruoyi.version>3.0.0</ruoyi.version> | ||
| 23 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | 17 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| 24 | <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | 18 | <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> |
| 25 | <java.version>1.8</java.version> | 19 | <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> | 20 | + <mybatis.boot.version>1.3.2</mybatis.boot.version> |
| 29 | <druid.version>1.1.14</druid.version> | 21 | <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> | 22 | <bitwalker.version>1.19</bitwalker.version> |
| 33 | - <jwt.version>0.9.0</jwt.version> | ||
| 34 | <swagger.version>2.9.2</swagger.version> | 23 | <swagger.version>2.9.2</swagger.version> |
| 35 | - <poi.version>3.17</poi.version> | 24 | + <pagehelper.boot.version>1.2.5</pagehelper.boot.version> |
| 25 | + <fastjson.version>1.2.70</fastjson.version> | ||
| 36 | <oshi.version>3.9.1</oshi.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> | ||
| 37 | <velocity.version>1.7</velocity.version> | 30 | <velocity.version>1.7</velocity.version> |
| 31 | + <jwt.version>0.9.0</jwt.version> | ||
| 38 | </properties> | 32 | </properties> |
| 39 | 33 | ||
| 34 | + <!-- 依赖声明 --> | ||
| 35 | + <dependencyManagement> | ||
| 40 | <dependencies> | 36 | <dependencies> |
| 41 | 37 | ||
| 42 | - <!-- SpringBoot 核心包 --> | ||
| 43 | - <dependency> | ||
| 44 | - <groupId>org.springframework.boot</groupId> | ||
| 45 | - <artifactId>spring-boot-starter</artifactId> | ||
| 46 | - </dependency> | ||
| 47 | - | ||
| 48 | - <!-- SpringBoot 测试 --> | 38 | + <!-- SpringBoot的依赖配置--> |
| 49 | <dependency> | 39 | <dependency> |
| 50 | <groupId>org.springframework.boot</groupId> | 40 | <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> | 41 | + <artifactId>spring-boot-dependencies</artifactId> |
| 42 | + <version>2.1.1.RELEASE</version> | ||
| 43 | + <type>pom</type> | ||
| 44 | + <scope>import</scope> | ||
| 90 | </dependency> | 45 | </dependency> |
| 91 | 46 | ||
| 92 | - <!-- Mysql驱动包 --> | 47 | + <!--阿里数据库连接池 --> |
| 93 | <dependency> | 48 | <dependency> |
| 94 | - <groupId>mysql</groupId> | ||
| 95 | - <artifactId>mysql-connector-java</artifactId> | ||
| 96 | - <scope>runtime</scope> | 49 | + <groupId>com.alibaba</groupId> |
| 50 | + <artifactId>druid-spring-boot-starter</artifactId> | ||
| 51 | + <version>${druid.version}</version> | ||
| 97 | </dependency> | 52 | </dependency> |
| 98 | 53 | ||
| 99 | - <!-- SpringBoot集成mybatis框架 --> | 54 | + <!-- 解析客户端操作系统、浏览器等 --> |
| 100 | <dependency> | 55 | <dependency> |
| 101 | - <groupId>org.mybatis.spring.boot</groupId> | ||
| 102 | - <artifactId>mybatis-spring-boot-starter</artifactId> | ||
| 103 | - <version>${mybatis.spring.boot.starter.version}</version> | 56 | + <groupId>eu.bitwalker</groupId> |
| 57 | + <artifactId>UserAgentUtils</artifactId> | ||
| 58 | + <version>${bitwalker.version}</version> | ||
| 104 | </dependency> | 59 | </dependency> |
| 105 | 60 | ||
| 106 | <!-- pagehelper 分页插件 --> | 61 | <!-- pagehelper 分页插件 --> |
| 107 | <dependency> | 62 | <dependency> |
| 108 | <groupId>com.github.pagehelper</groupId> | 63 | <groupId>com.github.pagehelper</groupId> |
| 109 | <artifactId>pagehelper-spring-boot-starter</artifactId> | 64 | <artifactId>pagehelper-spring-boot-starter</artifactId> |
| 110 | - <version>${pagehelper.spring.boot.starter.version}</version> | 65 | + <version>${pagehelper.boot.version}</version> |
| 111 | </dependency> | 66 | </dependency> |
| 112 | 67 | ||
| 113 | - <!--阿里数据库连接池 --> | 68 | + <!-- 获取系统信息 --> |
| 114 | <dependency> | 69 | <dependency> |
| 115 | - <groupId>com.alibaba</groupId> | ||
| 116 | - <artifactId>druid-spring-boot-starter</artifactId> | ||
| 117 | - <version>${druid.version}</version> | 70 | + <groupId>com.github.oshi</groupId> |
| 71 | + <artifactId>oshi-core</artifactId> | ||
| 72 | + <version>${oshi.version}</version> | ||
| 118 | </dependency> | 73 | </dependency> |
| 119 | 74 | ||
| 120 | - <!--常用工具类 --> | 75 | + <!-- swagger2--> |
| 121 | <dependency> | 76 | <dependency> |
| 122 | - <groupId>org.apache.commons</groupId> | ||
| 123 | - <artifactId>commons-lang3</artifactId> | 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> | ||
| 124 | </dependency> | 97 | </dependency> |
| 125 | 98 | ||
| 126 | <!--io常用工具类 --> | 99 | <!--io常用工具类 --> |
| @@ -137,11 +110,18 @@ | @@ -137,11 +110,18 @@ | ||
| 137 | <version>${commons.fileupload.version}</version> | 110 | <version>${commons.fileupload.version}</version> |
| 138 | </dependency> | 111 | </dependency> |
| 139 | 112 | ||
| 140 | - <!-- 解析客户端操作系统、浏览器等 --> | 113 | + <!-- excel工具 --> |
| 141 | <dependency> | 114 | <dependency> |
| 142 | - <groupId>eu.bitwalker</groupId> | ||
| 143 | - <artifactId>UserAgentUtils</artifactId> | ||
| 144 | - <version>${bitwalker.version}</version> | 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> | ||
| 145 | </dependency> | 125 | </dependency> |
| 146 | 126 | ||
| 147 | <!-- 阿里JSON解析器 --> | 127 | <!-- 阿里JSON解析器 --> |
| @@ -151,12 +131,6 @@ | @@ -151,12 +131,6 @@ | ||
| 151 | <version>${fastjson.version}</version> | 131 | <version>${fastjson.version}</version> |
| 152 | </dependency> | 132 | </dependency> |
| 153 | 133 | ||
| 154 | - <!--Spring框架基本的核心工具--> | ||
| 155 | - <dependency> | ||
| 156 | - <groupId>org.springframework</groupId> | ||
| 157 | - <artifactId>spring-context-support</artifactId> | ||
| 158 | - </dependency> | ||
| 159 | - | ||
| 160 | <!--Token生成与解析--> | 134 | <!--Token生成与解析--> |
| 161 | <dependency> | 135 | <dependency> |
| 162 | <groupId>io.jsonwebtoken</groupId> | 136 | <groupId>io.jsonwebtoken</groupId> |
| @@ -164,96 +138,69 @@ | @@ -164,96 +138,69 @@ | ||
| 164 | <version>${jwt.version}</version> | 138 | <version>${jwt.version}</version> |
| 165 | </dependency> | 139 | </dependency> |
| 166 | 140 | ||
| 167 | - <!-- swagger2--> | 141 | + <!-- 定时任务--> |
| 168 | <dependency> | 142 | <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> | 143 | + <groupId>com.ruoyi</groupId> |
| 144 | + <artifactId>ruoyi-quartz</artifactId> | ||
| 145 | + <version>${ruoyi.version}</version> | ||
| 189 | </dependency> | 146 | </dependency> |
| 190 | 147 | ||
| 148 | + <!-- 代码生成--> | ||
| 191 | <dependency> | 149 | <dependency> |
| 192 | - <groupId>io.swagger</groupId> | ||
| 193 | - <artifactId>swagger-models</artifactId> | ||
| 194 | - <version>1.5.21</version> | 150 | + <groupId>com.ruoyi</groupId> |
| 151 | + <artifactId>ruoyi-generator</artifactId> | ||
| 152 | + <version>${ruoyi.version}</version> | ||
| 195 | </dependency> | 153 | </dependency> |
| 196 | 154 | ||
| 197 | - <!-- swagger2-UI--> | 155 | + <!-- 核心模块--> |
| 198 | <dependency> | 156 | <dependency> |
| 199 | - <groupId>io.springfox</groupId> | ||
| 200 | - <artifactId>springfox-swagger-ui</artifactId> | ||
| 201 | - <version>${swagger.version}</version> | 157 | + <groupId>com.ruoyi</groupId> |
| 158 | + <artifactId>ruoyi-framework</artifactId> | ||
| 159 | + <version>${ruoyi.version}</version> | ||
| 202 | </dependency> | 160 | </dependency> |
| 203 | 161 | ||
| 204 | - <!-- 获取系统信息 --> | 162 | + <!-- 系统模块--> |
| 205 | <dependency> | 163 | <dependency> |
| 206 | - <groupId>com.github.oshi</groupId> | ||
| 207 | - <artifactId>oshi-core</artifactId> | ||
| 208 | - <version>${oshi.version}</version> | 164 | + <groupId>com.ruoyi</groupId> |
| 165 | + <artifactId>ruoyi-system</artifactId> | ||
| 166 | + <version>${ruoyi.version}</version> | ||
| 209 | </dependency> | 167 | </dependency> |
| 210 | 168 | ||
| 169 | + <!-- 通用工具--> | ||
| 211 | <dependency> | 170 | <dependency> |
| 212 | - <groupId>net.java.dev.jna</groupId> | ||
| 213 | - <artifactId>jna</artifactId> | 171 | + <groupId>com.ruoyi</groupId> |
| 172 | + <artifactId>ruoyi-common</artifactId> | ||
| 173 | + <version>${ruoyi.version}</version> | ||
| 214 | </dependency> | 174 | </dependency> |
| 215 | 175 | ||
| 216 | - <dependency> | ||
| 217 | - <groupId>net.java.dev.jna</groupId> | ||
| 218 | - <artifactId>jna-platform</artifactId> | ||
| 219 | - </dependency> | 176 | + </dependencies> |
| 177 | + </dependencyManagement> | ||
| 220 | 178 | ||
| 221 | - <!-- excel工具 --> | ||
| 222 | - <dependency> | ||
| 223 | - <groupId>org.apache.poi</groupId> | ||
| 224 | - <artifactId>poi-ooxml</artifactId> | ||
| 225 | - <version>${poi.version}</version> | ||
| 226 | - </dependency> | 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> | ||
| 227 | 188 | ||
| 228 | - <!--velocity代码生成使用模板 --> | ||
| 229 | - <dependency> | ||
| 230 | - <groupId>org.apache.velocity</groupId> | ||
| 231 | - <artifactId>velocity</artifactId> | ||
| 232 | - <version>${velocity.version}</version> | ||
| 233 | - </dependency> | ||
| 234 | 189 | ||
| 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> | 190 | + <dependencies> |
| 246 | 191 | ||
| 247 | </dependencies> | 192 | </dependencies> |
| 248 | 193 | ||
| 249 | <build> | 194 | <build> |
| 250 | - <finalName>${project.artifactId}</finalName> | ||
| 251 | <plugins> | 195 | <plugins> |
| 252 | <plugin> | 196 | <plugin> |
| 253 | - <groupId>org.springframework.boot</groupId> | ||
| 254 | - <artifactId>spring-boot-maven-plugin</artifactId> | 197 | + <groupId>org.apache.maven.plugins</groupId> |
| 198 | + <artifactId>maven-compiler-plugin</artifactId> | ||
| 199 | + <version>3.1</version> | ||
| 255 | <configuration> | 200 | <configuration> |
| 256 | - <fork>true</fork> <!-- 如果没有该配置,devtools不会生效 --> | 201 | + <source>${java.version}</source> |
| 202 | + <target>${java.version}</target> | ||
| 203 | + <encoding>${project.build.sourceEncoding}</encoding> | ||
| 257 | </configuration> | 204 | </configuration> |
| 258 | </plugin> | 205 | </plugin> |
| 259 | </plugins> | 206 | </plugins> |
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> |
| 1 | -package com.ruoyi.project.common; | 1 | +package com.ruoyi.web.controller.common; |
| 2 | 2 | ||
| 3 | import java.io.ByteArrayOutputStream; | 3 | import java.io.ByteArrayOutputStream; |
| 4 | import java.io.IOException; | 4 | import java.io.IOException; |
| @@ -8,11 +8,11 @@ import org.springframework.beans.factory.annotation.Autowired; | @@ -8,11 +8,11 @@ import org.springframework.beans.factory.annotation.Autowired; | ||
| 8 | import org.springframework.web.bind.annotation.GetMapping; | 8 | import org.springframework.web.bind.annotation.GetMapping; |
| 9 | import org.springframework.web.bind.annotation.RestController; | 9 | import org.springframework.web.bind.annotation.RestController; |
| 10 | import com.ruoyi.common.constant.Constants; | 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 | import com.ruoyi.common.utils.VerifyCodeUtils; | 13 | import com.ruoyi.common.utils.VerifyCodeUtils; |
| 13 | import com.ruoyi.common.utils.sign.Base64; | 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 | * 验证码操作处理 |
| 1 | -package com.ruoyi.project.common; | 1 | +package com.ruoyi.web.controller.common; |
| 2 | 2 | ||
| 3 | import javax.servlet.http.HttpServletRequest; | 3 | import javax.servlet.http.HttpServletRequest; |
| 4 | import javax.servlet.http.HttpServletResponse; | 4 | import javax.servlet.http.HttpServletResponse; |
| @@ -9,13 +9,13 @@ import org.springframework.web.bind.annotation.GetMapping; | @@ -9,13 +9,13 @@ import org.springframework.web.bind.annotation.GetMapping; | ||
| 9 | import org.springframework.web.bind.annotation.PostMapping; | 9 | import org.springframework.web.bind.annotation.PostMapping; |
| 10 | import org.springframework.web.bind.annotation.RestController; | 10 | import org.springframework.web.bind.annotation.RestController; |
| 11 | import org.springframework.web.multipart.MultipartFile; | 11 | import org.springframework.web.multipart.MultipartFile; |
| 12 | +import com.ruoyi.common.config.RuoYiConfig; | ||
| 12 | import com.ruoyi.common.constant.Constants; | 13 | import com.ruoyi.common.constant.Constants; |
| 14 | +import com.ruoyi.common.core.domain.AjaxResult; | ||
| 13 | import com.ruoyi.common.utils.StringUtils; | 15 | import com.ruoyi.common.utils.StringUtils; |
| 14 | import com.ruoyi.common.utils.file.FileUploadUtils; | 16 | import com.ruoyi.common.utils.file.FileUploadUtils; |
| 15 | import com.ruoyi.common.utils.file.FileUtils; | 17 | import com.ruoyi.common.utils.file.FileUtils; |
| 16 | -import com.ruoyi.framework.config.RuoYiConfig; | ||
| 17 | import com.ruoyi.framework.config.ServerConfig; | 18 | import com.ruoyi.framework.config.ServerConfig; |
| 18 | -import com.ruoyi.framework.web.domain.AjaxResult; | ||
| 19 | 19 | ||
| 20 | /** | 20 | /** |
| 21 | * 通用请求处理 | 21 | * 通用请求处理 |
| 1 | -package com.ruoyi.project.monitor.controller; | 1 | +package com.ruoyi.web.controller.monitor; |
| 2 | 2 | ||
| 3 | import org.springframework.security.access.prepost.PreAuthorize; | 3 | import org.springframework.security.access.prepost.PreAuthorize; |
| 4 | import org.springframework.web.bind.annotation.GetMapping; | 4 | import org.springframework.web.bind.annotation.GetMapping; |
| 5 | import org.springframework.web.bind.annotation.RequestMapping; | 5 | import org.springframework.web.bind.annotation.RequestMapping; |
| 6 | import org.springframework.web.bind.annotation.RestController; | 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 | import com.ruoyi.framework.web.domain.Server; | 9 | import com.ruoyi.framework.web.domain.Server; |
| 10 | 10 | ||
| 11 | /** | 11 | /** |
| 1 | -package com.ruoyi.project.monitor.controller; | 1 | +package com.ruoyi.web.controller.monitor; |
| 2 | 2 | ||
| 3 | import java.util.List; | 3 | import java.util.List; |
| 4 | import org.springframework.beans.factory.annotation.Autowired; | 4 | import org.springframework.beans.factory.annotation.Autowired; |
| @@ -8,14 +8,14 @@ import org.springframework.web.bind.annotation.GetMapping; | @@ -8,14 +8,14 @@ import org.springframework.web.bind.annotation.GetMapping; | ||
| 8 | import org.springframework.web.bind.annotation.PathVariable; | 8 | import org.springframework.web.bind.annotation.PathVariable; |
| 9 | import org.springframework.web.bind.annotation.RequestMapping; | 9 | import org.springframework.web.bind.annotation.RequestMapping; |
| 10 | import org.springframework.web.bind.annotation.RestController; | 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 | import com.ruoyi.common.utils.poi.ExcelUtil; | 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 | * 系统访问记录 |
| 1 | -package com.ruoyi.project.monitor.controller; | 1 | +package com.ruoyi.web.controller.monitor; |
| 2 | 2 | ||
| 3 | import java.util.List; | 3 | import java.util.List; |
| 4 | import org.springframework.beans.factory.annotation.Autowired; | 4 | import org.springframework.beans.factory.annotation.Autowired; |
| @@ -8,14 +8,14 @@ import org.springframework.web.bind.annotation.GetMapping; | @@ -8,14 +8,14 @@ import org.springframework.web.bind.annotation.GetMapping; | ||
| 8 | import org.springframework.web.bind.annotation.PathVariable; | 8 | import org.springframework.web.bind.annotation.PathVariable; |
| 9 | import org.springframework.web.bind.annotation.RequestMapping; | 9 | import org.springframework.web.bind.annotation.RequestMapping; |
| 10 | import org.springframework.web.bind.annotation.RestController; | 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 | import com.ruoyi.common.utils.poi.ExcelUtil; | 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 | * 操作日志记录 |
| 1 | -package com.ruoyi.project.monitor.controller; | 1 | +package com.ruoyi.web.controller.monitor; |
| 2 | 2 | ||
| 3 | import java.util.ArrayList; | 3 | import java.util.ArrayList; |
| 4 | import java.util.Collection; | 4 | import java.util.Collection; |
| @@ -11,17 +11,17 @@ import org.springframework.web.bind.annotation.GetMapping; | @@ -11,17 +11,17 @@ import org.springframework.web.bind.annotation.GetMapping; | ||
| 11 | import org.springframework.web.bind.annotation.PathVariable; | 11 | import org.springframework.web.bind.annotation.PathVariable; |
| 12 | import org.springframework.web.bind.annotation.RequestMapping; | 12 | import org.springframework.web.bind.annotation.RequestMapping; |
| 13 | import org.springframework.web.bind.annotation.RestController; | 13 | import org.springframework.web.bind.annotation.RestController; |
| 14 | +import com.ruoyi.common.annotation.Log; | ||
| 14 | import com.ruoyi.common.constant.Constants; | 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 | import com.ruoyi.common.utils.StringUtils; | 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 | * 在线用户监控 |
| 1 | -package com.ruoyi.project.system.controller; | 1 | +package com.ruoyi.web.controller.system; |
| 2 | 2 | ||
| 3 | import java.util.List; | 3 | import java.util.List; |
| 4 | import org.springframework.beans.factory.annotation.Autowired; | 4 | import org.springframework.beans.factory.annotation.Autowired; |
| @@ -12,16 +12,17 @@ import org.springframework.web.bind.annotation.PutMapping; | @@ -12,16 +12,17 @@ import org.springframework.web.bind.annotation.PutMapping; | ||
| 12 | import org.springframework.web.bind.annotation.RequestBody; | 12 | import org.springframework.web.bind.annotation.RequestBody; |
| 13 | import org.springframework.web.bind.annotation.RequestMapping; | 13 | import org.springframework.web.bind.annotation.RequestMapping; |
| 14 | import org.springframework.web.bind.annotation.RestController; | 14 | import org.springframework.web.bind.annotation.RestController; |
| 15 | +import com.ruoyi.common.annotation.Log; | ||
| 16 | +import com.ruoyi.common.annotation.RepeatSubmit; | ||
| 15 | import com.ruoyi.common.constant.UserConstants; | 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 | import com.ruoyi.common.utils.SecurityUtils; | 22 | import com.ruoyi.common.utils.SecurityUtils; |
| 17 | import com.ruoyi.common.utils.poi.ExcelUtil; | 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,6 +83,7 @@ public class SysConfigController extends BaseController | ||
| 82 | @PreAuthorize("@ss.hasPermi('system:config:add')") | 83 | @PreAuthorize("@ss.hasPermi('system:config:add')") |
| 83 | @Log(title = "参数管理", businessType = BusinessType.INSERT) | 84 | @Log(title = "参数管理", businessType = BusinessType.INSERT) |
| 84 | @PostMapping | 85 | @PostMapping |
| 86 | + @RepeatSubmit | ||
| 85 | public AjaxResult add(@Validated @RequestBody SysConfig config) | 87 | public AjaxResult add(@Validated @RequestBody SysConfig config) |
| 86 | { | 88 | { |
| 87 | if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config))) | 89 | if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config))) |
| 1 | -package com.ruoyi.project.system.controller; | 1 | +package com.ruoyi.web.controller.system; |
| 2 | 2 | ||
| 3 | import java.util.Iterator; | 3 | import java.util.Iterator; |
| 4 | import java.util.List; | 4 | import java.util.List; |
| @@ -14,15 +14,15 @@ import org.springframework.web.bind.annotation.PutMapping; | @@ -14,15 +14,15 @@ import org.springframework.web.bind.annotation.PutMapping; | ||
| 14 | import org.springframework.web.bind.annotation.RequestBody; | 14 | import org.springframework.web.bind.annotation.RequestBody; |
| 15 | import org.springframework.web.bind.annotation.RequestMapping; | 15 | import org.springframework.web.bind.annotation.RequestMapping; |
| 16 | import org.springframework.web.bind.annotation.RestController; | 16 | import org.springframework.web.bind.annotation.RestController; |
| 17 | +import com.ruoyi.common.annotation.Log; | ||
| 17 | import com.ruoyi.common.constant.UserConstants; | 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 | import com.ruoyi.common.utils.SecurityUtils; | 23 | import com.ruoyi.common.utils.SecurityUtils; |
| 19 | import com.ruoyi.common.utils.StringUtils; | 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 | * 部门信息 |
| 1 | -package com.ruoyi.project.system.controller; | 1 | +package com.ruoyi.web.controller.system; |
| 2 | 2 | ||
| 3 | import java.util.List; | 3 | import java.util.List; |
| 4 | import org.springframework.beans.factory.annotation.Autowired; | 4 | import org.springframework.beans.factory.annotation.Autowired; |
| @@ -12,16 +12,16 @@ import org.springframework.web.bind.annotation.PutMapping; | @@ -12,16 +12,16 @@ import org.springframework.web.bind.annotation.PutMapping; | ||
| 12 | import org.springframework.web.bind.annotation.RequestBody; | 12 | import org.springframework.web.bind.annotation.RequestBody; |
| 13 | import org.springframework.web.bind.annotation.RequestMapping; | 13 | import org.springframework.web.bind.annotation.RequestMapping; |
| 14 | import org.springframework.web.bind.annotation.RestController; | 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 | import com.ruoyi.common.utils.SecurityUtils; | 21 | import com.ruoyi.common.utils.SecurityUtils; |
| 16 | import com.ruoyi.common.utils.poi.ExcelUtil; | 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 | * 数据字典信息 |
| 1 | -package com.ruoyi.project.system.controller; | 1 | +package com.ruoyi.web.controller.system; |
| 2 | 2 | ||
| 3 | import java.util.List; | 3 | import java.util.List; |
| 4 | import org.springframework.beans.factory.annotation.Autowired; | 4 | import org.springframework.beans.factory.annotation.Autowired; |
| @@ -12,16 +12,16 @@ import org.springframework.web.bind.annotation.PutMapping; | @@ -12,16 +12,16 @@ import org.springframework.web.bind.annotation.PutMapping; | ||
| 12 | import org.springframework.web.bind.annotation.RequestBody; | 12 | import org.springframework.web.bind.annotation.RequestBody; |
| 13 | import org.springframework.web.bind.annotation.RequestMapping; | 13 | import org.springframework.web.bind.annotation.RequestMapping; |
| 14 | import org.springframework.web.bind.annotation.RestController; | 14 | import org.springframework.web.bind.annotation.RestController; |
| 15 | +import com.ruoyi.common.annotation.Log; | ||
| 15 | import com.ruoyi.common.constant.UserConstants; | 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 | import com.ruoyi.common.utils.SecurityUtils; | 22 | import com.ruoyi.common.utils.SecurityUtils; |
| 17 | import com.ruoyi.common.utils.poi.ExcelUtil; | 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 | * 数据字典信息 |
| 1 | -package com.ruoyi.project.system.controller; | 1 | +package com.ruoyi.web.controller.system; |
| 2 | 2 | ||
| 3 | import java.util.List; | 3 | import java.util.List; |
| 4 | import java.util.Set; | 4 | import java.util.Set; |
| @@ -8,16 +8,16 @@ import org.springframework.web.bind.annotation.PostMapping; | @@ -8,16 +8,16 @@ import org.springframework.web.bind.annotation.PostMapping; | ||
| 8 | import org.springframework.web.bind.annotation.RequestBody; | 8 | import org.springframework.web.bind.annotation.RequestBody; |
| 9 | import org.springframework.web.bind.annotation.RestController; | 9 | import org.springframework.web.bind.annotation.RestController; |
| 10 | import com.ruoyi.common.constant.Constants; | 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 | import com.ruoyi.common.utils.ServletUtils; | 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 | * 登录验证 |
| 1 | -package com.ruoyi.project.system.controller; | 1 | +package com.ruoyi.web.controller.system; |
| 2 | 2 | ||
| 3 | import java.util.List; | 3 | import java.util.List; |
| 4 | import org.springframework.beans.factory.annotation.Autowired; | 4 | import org.springframework.beans.factory.annotation.Autowired; |
| @@ -12,19 +12,19 @@ import org.springframework.web.bind.annotation.PutMapping; | @@ -12,19 +12,19 @@ import org.springframework.web.bind.annotation.PutMapping; | ||
| 12 | import org.springframework.web.bind.annotation.RequestBody; | 12 | import org.springframework.web.bind.annotation.RequestBody; |
| 13 | import org.springframework.web.bind.annotation.RequestMapping; | 13 | import org.springframework.web.bind.annotation.RequestMapping; |
| 14 | import org.springframework.web.bind.annotation.RestController; | 14 | import org.springframework.web.bind.annotation.RestController; |
| 15 | +import com.ruoyi.common.annotation.Log; | ||
| 15 | import com.ruoyi.common.constant.Constants; | 16 | import com.ruoyi.common.constant.Constants; |
| 16 | import com.ruoyi.common.constant.UserConstants; | 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 | import com.ruoyi.common.utils.SecurityUtils; | 23 | import com.ruoyi.common.utils.SecurityUtils; |
| 18 | import com.ruoyi.common.utils.ServletUtils; | 24 | import com.ruoyi.common.utils.ServletUtils; |
| 19 | import com.ruoyi.common.utils.StringUtils; | 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 | * 菜单信息 |
| 1 | -package com.ruoyi.project.system.controller; | 1 | +package com.ruoyi.web.controller.system; |
| 2 | 2 | ||
| 3 | import java.util.List; | 3 | import java.util.List; |
| 4 | import org.springframework.beans.factory.annotation.Autowired; | 4 | import org.springframework.beans.factory.annotation.Autowired; |
| @@ -12,14 +12,14 @@ import org.springframework.web.bind.annotation.PutMapping; | @@ -12,14 +12,14 @@ import org.springframework.web.bind.annotation.PutMapping; | ||
| 12 | import org.springframework.web.bind.annotation.RequestBody; | 12 | import org.springframework.web.bind.annotation.RequestBody; |
| 13 | import org.springframework.web.bind.annotation.RequestMapping; | 13 | import org.springframework.web.bind.annotation.RequestMapping; |
| 14 | import org.springframework.web.bind.annotation.RestController; | 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 | import com.ruoyi.common.utils.SecurityUtils; | 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 | * 公告 信息操作处理 |
| 1 | -package com.ruoyi.project.system.controller; | 1 | +package com.ruoyi.web.controller.system; |
| 2 | 2 | ||
| 3 | import java.util.List; | 3 | import java.util.List; |
| 4 | import org.springframework.beans.factory.annotation.Autowired; | 4 | import org.springframework.beans.factory.annotation.Autowired; |
| @@ -12,16 +12,16 @@ import org.springframework.web.bind.annotation.PutMapping; | @@ -12,16 +12,16 @@ import org.springframework.web.bind.annotation.PutMapping; | ||
| 12 | import org.springframework.web.bind.annotation.RequestBody; | 12 | import org.springframework.web.bind.annotation.RequestBody; |
| 13 | import org.springframework.web.bind.annotation.RequestMapping; | 13 | import org.springframework.web.bind.annotation.RequestMapping; |
| 14 | import org.springframework.web.bind.annotation.RestController; | 14 | import org.springframework.web.bind.annotation.RestController; |
| 15 | +import com.ruoyi.common.annotation.Log; | ||
| 15 | import com.ruoyi.common.constant.UserConstants; | 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 | import com.ruoyi.common.utils.SecurityUtils; | 21 | import com.ruoyi.common.utils.SecurityUtils; |
| 17 | import com.ruoyi.common.utils.poi.ExcelUtil; | 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 | * 岗位信息操作处理 |
| 1 | -package com.ruoyi.project.system.controller; | 1 | +package com.ruoyi.web.controller.system; |
| 2 | 2 | ||
| 3 | import java.io.IOException; | 3 | import java.io.IOException; |
| 4 | import org.springframework.beans.factory.annotation.Autowired; | 4 | import org.springframework.beans.factory.annotation.Autowired; |
| @@ -10,18 +10,18 @@ import org.springframework.web.bind.annotation.RequestMapping; | @@ -10,18 +10,18 @@ import org.springframework.web.bind.annotation.RequestMapping; | ||
| 10 | import org.springframework.web.bind.annotation.RequestParam; | 10 | import org.springframework.web.bind.annotation.RequestParam; |
| 11 | import org.springframework.web.bind.annotation.RestController; | 11 | import org.springframework.web.bind.annotation.RestController; |
| 12 | import org.springframework.web.multipart.MultipartFile; | 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 | import com.ruoyi.common.utils.SecurityUtils; | 20 | import com.ruoyi.common.utils.SecurityUtils; |
| 14 | import com.ruoyi.common.utils.ServletUtils; | 21 | import com.ruoyi.common.utils.ServletUtils; |
| 15 | import com.ruoyi.common.utils.file.FileUploadUtils; | 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 | * 个人信息 业务处理 |
| 1 | -package com.ruoyi.project.system.controller; | 1 | +package com.ruoyi.web.controller.system; |
| 2 | 2 | ||
| 3 | import java.util.List; | 3 | import java.util.List; |
| 4 | import org.springframework.beans.factory.annotation.Autowired; | 4 | import org.springframework.beans.factory.annotation.Autowired; |
| @@ -12,16 +12,16 @@ import org.springframework.web.bind.annotation.PutMapping; | @@ -12,16 +12,16 @@ import org.springframework.web.bind.annotation.PutMapping; | ||
| 12 | import org.springframework.web.bind.annotation.RequestBody; | 12 | import org.springframework.web.bind.annotation.RequestBody; |
| 13 | import org.springframework.web.bind.annotation.RequestMapping; | 13 | import org.springframework.web.bind.annotation.RequestMapping; |
| 14 | import org.springframework.web.bind.annotation.RestController; | 14 | import org.springframework.web.bind.annotation.RestController; |
| 15 | +import com.ruoyi.common.annotation.Log; | ||
| 15 | import com.ruoyi.common.constant.UserConstants; | 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 | import com.ruoyi.common.utils.SecurityUtils; | 22 | import com.ruoyi.common.utils.SecurityUtils; |
| 17 | import com.ruoyi.common.utils.poi.ExcelUtil; | 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 | * 角色信息 |
| 1 | -package com.ruoyi.project.system.controller; | 1 | +package com.ruoyi.web.controller.system; |
| 2 | 2 | ||
| 3 | import java.util.List; | 3 | import java.util.List; |
| 4 | import java.util.stream.Collectors; | 4 | import java.util.stream.Collectors; |
| @@ -14,23 +14,23 @@ import org.springframework.web.bind.annotation.RequestBody; | @@ -14,23 +14,23 @@ import org.springframework.web.bind.annotation.RequestBody; | ||
| 14 | import org.springframework.web.bind.annotation.RequestMapping; | 14 | import org.springframework.web.bind.annotation.RequestMapping; |
| 15 | import org.springframework.web.bind.annotation.RestController; | 15 | import org.springframework.web.bind.annotation.RestController; |
| 16 | import org.springframework.web.multipart.MultipartFile; | 16 | import org.springframework.web.multipart.MultipartFile; |
| 17 | +import com.ruoyi.common.annotation.Log; | ||
| 17 | import com.ruoyi.common.constant.UserConstants; | 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 | import com.ruoyi.common.utils.SecurityUtils; | 26 | import com.ruoyi.common.utils.SecurityUtils; |
| 19 | import com.ruoyi.common.utils.ServletUtils; | 27 | import com.ruoyi.common.utils.ServletUtils; |
| 20 | import com.ruoyi.common.utils.StringUtils; | 28 | import com.ruoyi.common.utils.StringUtils; |
| 21 | import com.ruoyi.common.utils.poi.ExcelUtil; | 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 | * 用户信息 |
| 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 | +} |
| 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 | +} |
| 1 | -package com.ruoyi.framework.config; | 1 | +package com.ruoyi.web.core.config; |
| 2 | 2 | ||
| 3 | import java.util.ArrayList; | 3 | import java.util.ArrayList; |
| 4 | import java.util.List; | 4 | import java.util.List; |
| @@ -6,6 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired; | @@ -6,6 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired; | ||
| 6 | import org.springframework.beans.factory.annotation.Value; | 6 | import org.springframework.beans.factory.annotation.Value; |
| 7 | import org.springframework.context.annotation.Bean; | 7 | import org.springframework.context.annotation.Bean; |
| 8 | import org.springframework.context.annotation.Configuration; | 8 | import org.springframework.context.annotation.Configuration; |
| 9 | +import com.ruoyi.common.config.RuoYiConfig; | ||
| 9 | import io.swagger.annotations.ApiOperation; | 10 | import io.swagger.annotations.ApiOperation; |
| 10 | import springfox.documentation.builders.ApiInfoBuilder; | 11 | import springfox.documentation.builders.ApiInfoBuilder; |
| 11 | import springfox.documentation.builders.PathSelectors; | 12 | import springfox.documentation.builders.PathSelectors; |
| 1 | +restart.include.json=/com.alibaba.fastjson.*.jar |
| 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 |
| 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 | +//////////////////////////////////////////////////////////////////// |
| 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> |
| 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> |
| 1 | -package com.ruoyi.framework.aspectj.lang.annotation; | 1 | +package com.ruoyi.common.annotation; |
| 2 | 2 | ||
| 3 | import java.lang.annotation.Documented; | 3 | import java.lang.annotation.Documented; |
| 4 | import java.lang.annotation.ElementType; | 4 | import java.lang.annotation.ElementType; |
| @@ -6,7 +6,7 @@ import java.lang.annotation.Inherited; | @@ -6,7 +6,7 @@ import java.lang.annotation.Inherited; | ||
| 6 | import java.lang.annotation.Retention; | 6 | import java.lang.annotation.Retention; |
| 7 | import java.lang.annotation.RetentionPolicy; | 7 | import java.lang.annotation.RetentionPolicy; |
| 8 | import java.lang.annotation.Target; | 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 | * 自定义多数据源切换注解 |
| 1 | -package com.ruoyi.framework.aspectj.lang.annotation; | 1 | +package com.ruoyi.common.annotation; |
| 2 | 2 | ||
| 3 | import java.lang.annotation.Documented; | 3 | import java.lang.annotation.Documented; |
| 4 | import java.lang.annotation.ElementType; | 4 | import java.lang.annotation.ElementType; |
| 5 | import java.lang.annotation.Retention; | 5 | import java.lang.annotation.Retention; |
| 6 | import java.lang.annotation.RetentionPolicy; | 6 | import java.lang.annotation.RetentionPolicy; |
| 7 | import java.lang.annotation.Target; | 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 | * 自定义操作日志记录注解 |
| 1 | -package com.ruoyi.framework.config; | 1 | +package com.ruoyi.common.config; |
| 2 | 2 | ||
| 3 | import org.springframework.boot.context.properties.ConfigurationProperties; | 3 | import org.springframework.boot.context.properties.ConfigurationProperties; |
| 4 | import org.springframework.stereotype.Component; | 4 | import org.springframework.stereotype.Component; |
| 1 | package com.ruoyi.common.constant; | 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,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 | * 用户头像 |
| 1 | -package com.ruoyi.framework.web.controller; | 1 | +package com.ruoyi.common.core.controller; |
| 2 | 2 | ||
| 3 | import java.beans.PropertyEditorSupport; | 3 | import java.beans.PropertyEditorSupport; |
| 4 | import java.util.Date; | 4 | import java.util.Date; |
| @@ -10,13 +10,13 @@ import org.springframework.web.bind.annotation.InitBinder; | @@ -10,13 +10,13 @@ import org.springframework.web.bind.annotation.InitBinder; | ||
| 10 | import com.github.pagehelper.PageHelper; | 10 | import com.github.pagehelper.PageHelper; |
| 11 | import com.github.pagehelper.PageInfo; | 11 | import com.github.pagehelper.PageInfo; |
| 12 | import com.ruoyi.common.constant.HttpStatus; | 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 | import com.ruoyi.common.utils.DateUtils; | 17 | import com.ruoyi.common.utils.DateUtils; |
| 14 | import com.ruoyi.common.utils.StringUtils; | 18 | import com.ruoyi.common.utils.StringUtils; |
| 15 | import com.ruoyi.common.utils.sql.SqlUtil; | 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 | * web层通用数据处理 | 22 | * web层通用数据处理 |
| @@ -83,4 +83,12 @@ public class BaseController | @@ -83,4 +83,12 @@ public class BaseController | ||
| 83 | { | 83 | { |
| 84 | return rows > 0 ? AjaxResult.success() : AjaxResult.error(); | 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 | } |
| 1 | -package com.ruoyi.framework.web.domain; | 1 | +package com.ruoyi.common.core.domain; |
| 2 | 2 | ||
| 3 | import java.io.Serializable; | 3 | import java.io.Serializable; |
| 4 | import java.util.List; | 4 | import java.util.List; |
| 5 | import java.util.stream.Collectors; | 5 | import java.util.stream.Collectors; |
| 6 | import com.fasterxml.jackson.annotation.JsonInclude; | 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 | * Treeselect树结构实体类 | 11 | * Treeselect树结构实体类 |
| 1 | -package com.ruoyi.project.system.domain; | 1 | +package com.ruoyi.common.core.domain.entity; |
| 2 | 2 | ||
| 3 | import java.util.ArrayList; | 3 | import java.util.ArrayList; |
| 4 | import java.util.List; | 4 | import java.util.List; |
| @@ -7,7 +7,7 @@ import javax.validation.constraints.NotBlank; | @@ -7,7 +7,7 @@ import javax.validation.constraints.NotBlank; | ||
| 7 | import javax.validation.constraints.Size; | 7 | import javax.validation.constraints.Size; |
| 8 | import org.apache.commons.lang3.builder.ToStringBuilder; | 8 | import org.apache.commons.lang3.builder.ToStringBuilder; |
| 9 | import org.apache.commons.lang3.builder.ToStringStyle; | 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 | * 部门表 sys_dept | 13 | * 部门表 sys_dept |
| 1 | -package com.ruoyi.project.system.domain; | 1 | +package com.ruoyi.common.core.domain.entity; |
| 2 | 2 | ||
| 3 | import javax.validation.constraints.NotBlank; | 3 | import javax.validation.constraints.NotBlank; |
| 4 | import javax.validation.constraints.Size; | 4 | import javax.validation.constraints.Size; |
| 5 | import org.apache.commons.lang3.builder.ToStringBuilder; | 5 | import org.apache.commons.lang3.builder.ToStringBuilder; |
| 6 | import org.apache.commons.lang3.builder.ToStringStyle; | 6 | import org.apache.commons.lang3.builder.ToStringStyle; |
| 7 | +import com.ruoyi.common.annotation.Excel; | ||
| 8 | +import com.ruoyi.common.annotation.Excel.ColumnType; | ||
| 7 | import com.ruoyi.common.constant.UserConstants; | 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 | * 字典数据表 sys_dict_data | 13 | * 字典数据表 sys_dict_data |
| 1 | -package com.ruoyi.project.system.domain; | 1 | +package com.ruoyi.common.core.domain.entity; |
| 2 | 2 | ||
| 3 | import javax.validation.constraints.NotBlank; | 3 | import javax.validation.constraints.NotBlank; |
| 4 | import javax.validation.constraints.Size; | 4 | import javax.validation.constraints.Size; |
| 5 | import org.apache.commons.lang3.builder.ToStringBuilder; | 5 | import org.apache.commons.lang3.builder.ToStringBuilder; |
| 6 | import org.apache.commons.lang3.builder.ToStringStyle; | 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 | * 字典类型表 sys_dict_type | 12 | * 字典类型表 sys_dict_type |
| 1 | -package com.ruoyi.project.system.domain; | 1 | +package com.ruoyi.common.core.domain.entity; |
| 2 | 2 | ||
| 3 | import java.util.ArrayList; | 3 | import java.util.ArrayList; |
| 4 | import java.util.List; | 4 | import java.util.List; |
| @@ -6,7 +6,7 @@ import javax.validation.constraints.NotBlank; | @@ -6,7 +6,7 @@ import javax.validation.constraints.NotBlank; | ||
| 6 | import javax.validation.constraints.Size; | 6 | import javax.validation.constraints.Size; |
| 7 | import org.apache.commons.lang3.builder.ToStringBuilder; | 7 | import org.apache.commons.lang3.builder.ToStringBuilder; |
| 8 | import org.apache.commons.lang3.builder.ToStringStyle; | 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 | * 菜单权限表 sys_menu | 12 | * 菜单权限表 sys_menu |
| 1 | -package com.ruoyi.project.system.domain; | 1 | +package com.ruoyi.common.core.domain.entity; |
| 2 | 2 | ||
| 3 | import javax.validation.constraints.NotBlank; | 3 | import javax.validation.constraints.NotBlank; |
| 4 | import javax.validation.constraints.Size; | 4 | import javax.validation.constraints.Size; |
| 5 | import org.apache.commons.lang3.builder.ToStringBuilder; | 5 | import org.apache.commons.lang3.builder.ToStringBuilder; |
| 6 | import org.apache.commons.lang3.builder.ToStringStyle; | 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 | * 角色表 sys_role | 12 | * 角色表 sys_role |
| 1 | -package com.ruoyi.project.system.domain; | 1 | +package com.ruoyi.common.core.domain.entity; |
| 2 | 2 | ||
| 3 | import java.util.Date; | 3 | import java.util.Date; |
| 4 | import java.util.List; | 4 | import java.util.List; |
| @@ -9,11 +9,11 @@ import org.apache.commons.lang3.builder.ToStringBuilder; | @@ -9,11 +9,11 @@ import org.apache.commons.lang3.builder.ToStringBuilder; | ||
| 9 | import org.apache.commons.lang3.builder.ToStringStyle; | 9 | import org.apache.commons.lang3.builder.ToStringStyle; |
| 10 | import com.fasterxml.jackson.annotation.JsonIgnore; | 10 | import com.fasterxml.jackson.annotation.JsonIgnore; |
| 11 | import com.fasterxml.jackson.annotation.JsonProperty; | 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 | * 用户对象 sys_user | 19 | * 用户对象 sys_user |
| 1 | -package com.ruoyi.framework.security; | 1 | +package com.ruoyi.common.core.domain.model; |
| 2 | 2 | ||
| 3 | import java.util.Collection; | 3 | import java.util.Collection; |
| 4 | import java.util.Set; | 4 | import java.util.Set; |
| 5 | import org.springframework.security.core.GrantedAuthority; | 5 | import org.springframework.security.core.GrantedAuthority; |
| 6 | import org.springframework.security.core.userdetails.UserDetails; | 6 | import org.springframework.security.core.userdetails.UserDetails; |
| 7 | import com.fasterxml.jackson.annotation.JsonIgnore; | 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 | * 登录用户身份权限 |
| 1 | -package com.ruoyi.framework.web.page; | 1 | +package com.ruoyi.common.core.page; |
| 2 | 2 | ||
| 3 | import com.ruoyi.common.utils.StringUtils; | 3 | import com.ruoyi.common.utils.StringUtils; |
| 4 | 4 | ||
| @@ -11,10 +11,13 @@ public class PageDomain | @@ -11,10 +11,13 @@ public class PageDomain | ||
| 11 | { | 11 | { |
| 12 | /** 当前记录起始索引 */ | 12 | /** 当前记录起始索引 */ |
| 13 | private Integer pageNum; | 13 | private Integer pageNum; |
| 14 | + | ||
| 14 | /** 每页显示记录数 */ | 15 | /** 每页显示记录数 */ |
| 15 | private Integer pageSize; | 16 | private Integer pageSize; |
| 17 | + | ||
| 16 | /** 排序列 */ | 18 | /** 排序列 */ |
| 17 | private String orderByColumn; | 19 | private String orderByColumn; |
| 20 | + | ||
| 18 | /** 排序的方向 "desc" 或者 "asc". */ | 21 | /** 排序的方向 "desc" 或者 "asc". */ |
| 19 | private String isAsc; | 22 | private String isAsc; |
| 20 | 23 |
| @@ -2,10 +2,11 @@ package com.ruoyi.common.utils; | @@ -2,10 +2,11 @@ package com.ruoyi.common.utils; | ||
| 2 | 2 | ||
| 3 | import java.util.Collection; | 3 | import java.util.Collection; |
| 4 | import java.util.List; | 4 | import java.util.List; |
| 5 | + | ||
| 5 | import com.ruoyi.common.constant.Constants; | 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 | import com.ruoyi.common.utils.spring.SpringUtils; | 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 | * 字典工具类 |
| @@ -4,8 +4,8 @@ import org.springframework.security.core.Authentication; | @@ -4,8 +4,8 @@ import org.springframework.security.core.Authentication; | ||
| 4 | import org.springframework.security.core.context.SecurityContextHolder; | 4 | import org.springframework.security.core.context.SecurityContextHolder; |
| 5 | import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; | 5 | import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; |
| 6 | import com.ruoyi.common.constant.HttpStatus; | 6 | import com.ruoyi.common.constant.HttpStatus; |
| 7 | +import com.ruoyi.common.core.domain.model.LoginUser; | ||
| 7 | import com.ruoyi.common.exception.CustomException; | 8 | import com.ruoyi.common.exception.CustomException; |
| 8 | -import com.ruoyi.framework.security.LoginUser; | ||
| 9 | 9 | ||
| 10 | /** | 10 | /** |
| 11 | * 安全服务工具类 | 11 | * 安全服务工具类 |
-
请 注册 或 登录 后发表评论