正在显示
5 个修改的文件
包含
52 行增加
和
51 行删除
| @@ -53,15 +53,16 @@ spring: | @@ -53,15 +53,16 @@ spring: | ||
| 53 | messages: | 53 | messages: |
| 54 | # 国际化资源文件路径 | 54 | # 国际化资源文件路径 |
| 55 | basename: i18n/messages | 55 | basename: i18n/messages |
| 56 | - profiles: | 56 | + profiles: |
| 57 | active: druid | 57 | active: druid |
| 58 | # 文件上传 | 58 | # 文件上传 |
| 59 | servlet: | 59 | servlet: |
| 60 | - multipart: | ||
| 61 | - # 单个文件大小 | ||
| 62 | - max-file-size: 10MB | ||
| 63 | - # 设置总上传的文件大小 | ||
| 64 | - max-request-size: 20MB | 60 | + multipart: |
| 61 | + # 单个文件大小 | ||
| 62 | + max-file-size: 10MB | ||
| 63 | + # 设置总上传的文件大小 | ||
| 64 | + max-request-size: 20MB | ||
| 65 | + | ||
| 65 | # 服务模块 | 66 | # 服务模块 |
| 66 | devtools: | 67 | devtools: |
| 67 | restart: | 68 | restart: |
| @@ -76,7 +77,7 @@ spring: | @@ -76,7 +77,7 @@ spring: | ||
| 76 | # 数据库索引 | 77 | # 数据库索引 |
| 77 | database: 0 | 78 | database: 0 |
| 78 | # 密码 | 79 | # 密码 |
| 79 | - password: | 80 | + password: |
| 80 | # 连接超时时间 | 81 | # 连接超时时间 |
| 81 | timeout: 10s | 82 | timeout: 10s |
| 82 | lettuce: | 83 | lettuce: |
| @@ -92,27 +93,27 @@ spring: | @@ -92,27 +93,27 @@ spring: | ||
| 92 | 93 | ||
| 93 | # token配置 | 94 | # token配置 |
| 94 | token: | 95 | token: |
| 95 | - # 令牌自定义标识 | ||
| 96 | - header: Authorization | ||
| 97 | - # 令牌密钥 | ||
| 98 | - secret: abcdefghijklmnopqrstuvwxyz | ||
| 99 | - # 令牌有效期(默认30分钟) | ||
| 100 | - expireTime: 30 | ||
| 101 | - | 96 | + # 令牌自定义标识 |
| 97 | + header: Authorization | ||
| 98 | + # 令牌密钥 | ||
| 99 | + secret: abcdefghijklmnopqrstuvwxyz | ||
| 100 | + # 令牌有效期(默认30分钟) | ||
| 101 | + expireTime: 30 | ||
| 102 | + | ||
| 102 | # MyBatis配置 | 103 | # MyBatis配置 |
| 103 | mybatis: | 104 | mybatis: |
| 104 | - # 搜索指定包别名 | ||
| 105 | - typeAliasesPackage: com.ruoyi.**.domain | ||
| 106 | - # 配置mapper的扫描,找到所有的mapper.xml映射文件 | ||
| 107 | - mapperLocations: classpath*:mapper/**/*Mapper.xml | ||
| 108 | - # 加载全局的配置文件 | ||
| 109 | - configLocation: classpath:mybatis/mybatis-config.xml | 105 | + # 搜索指定包别名 |
| 106 | + typeAliasesPackage: com.ruoyi.**.domain | ||
| 107 | + # 配置mapper的扫描,找到所有的mapper.xml映射文件 | ||
| 108 | + mapperLocations: classpath*:mapper/**/*Mapper.xml | ||
| 109 | + # 加载全局的配置文件 | ||
| 110 | + configLocation: classpath:mybatis/mybatis-config.xml | ||
| 110 | 111 | ||
| 111 | # PageHelper分页插件 | 112 | # PageHelper分页插件 |
| 112 | -pagehelper: | 113 | +pagehelper: |
| 113 | helperDialect: mysql | 114 | helperDialect: mysql |
| 114 | supportMethodsArguments: true | 115 | supportMethodsArguments: true |
| 115 | - params: count=countSql | 116 | + params: count=countSql |
| 116 | 117 | ||
| 117 | # Swagger配置 | 118 | # Swagger配置 |
| 118 | swagger: | 119 | swagger: |
| @@ -122,7 +123,7 @@ swagger: | @@ -122,7 +123,7 @@ swagger: | ||
| 122 | pathMapping: /dev-api | 123 | pathMapping: /dev-api |
| 123 | 124 | ||
| 124 | # 防止XSS攻击 | 125 | # 防止XSS攻击 |
| 125 | -xss: | 126 | +xss: |
| 126 | # 过滤开关 | 127 | # 过滤开关 |
| 127 | enabled: true | 128 | enabled: true |
| 128 | # 排除链接(多个用逗号分隔) | 129 | # 排除链接(多个用逗号分隔) |
| @@ -59,12 +59,12 @@ public @interface Excel | @@ -59,12 +59,12 @@ public @interface Excel | ||
| 59 | public int roundingMode() default BigDecimal.ROUND_HALF_EVEN; | 59 | public int roundingMode() default BigDecimal.ROUND_HALF_EVEN; |
| 60 | 60 | ||
| 61 | /** | 61 | /** |
| 62 | - * 导出时在excel中每个列的高度 单位为字符 | 62 | + * 导出时在excel中每个列的高度 |
| 63 | */ | 63 | */ |
| 64 | public double height() default 14; | 64 | public double height() default 14; |
| 65 | 65 | ||
| 66 | /** | 66 | /** |
| 67 | - * 导出时在excel中每个列的宽 单位为字符 | 67 | + * 导出时在excel中每个列的宽度 |
| 68 | */ | 68 | */ |
| 69 | public double width() default 16; | 69 | public double width() default 16; |
| 70 | 70 | ||
| @@ -114,7 +114,7 @@ public @interface Excel | @@ -114,7 +114,7 @@ public @interface Excel | ||
| 114 | public ColumnType cellType() default ColumnType.STRING; | 114 | public ColumnType cellType() default ColumnType.STRING; |
| 115 | 115 | ||
| 116 | /** | 116 | /** |
| 117 | - * 导出列头背景色 | 117 | + * 导出列头背景颜色 |
| 118 | */ | 118 | */ |
| 119 | public IndexedColors headerBackgroundColor() default IndexedColors.GREY_50_PERCENT; | 119 | public IndexedColors headerBackgroundColor() default IndexedColors.GREY_50_PERCENT; |
| 120 | 120 | ||
| @@ -124,7 +124,7 @@ public @interface Excel | @@ -124,7 +124,7 @@ public @interface Excel | ||
| 124 | public IndexedColors headerColor() default IndexedColors.WHITE; | 124 | public IndexedColors headerColor() default IndexedColors.WHITE; |
| 125 | 125 | ||
| 126 | /** | 126 | /** |
| 127 | - * 导出单元格背景色 | 127 | + * 导出单元格背景颜色 |
| 128 | */ | 128 | */ |
| 129 | public IndexedColors backgroundColor() default IndexedColors.WHITE; | 129 | public IndexedColors backgroundColor() default IndexedColors.WHITE; |
| 130 | 130 |
| 1 | package com.ruoyi.common.core.domain.model; | 1 | package com.ruoyi.common.core.domain.model; |
| 2 | 2 | ||
| 3 | -import java.util.Collection; | ||
| 4 | -import java.util.Set; | ||
| 5 | -import org.springframework.security.core.GrantedAuthority; | ||
| 6 | -import org.springframework.security.core.userdetails.UserDetails; | ||
| 7 | import com.alibaba.fastjson2.annotation.JSONField; | 3 | import com.alibaba.fastjson2.annotation.JSONField; |
| 8 | import com.ruoyi.common.core.domain.entity.SysUser; | 4 | import com.ruoyi.common.core.domain.entity.SysUser; |
| 5 | +import org.springframework.security.core.GrantedAuthority; | ||
| 6 | +import org.springframework.security.core.userdetails.UserDetails; | ||
| 7 | +import java.util.Collection; | ||
| 8 | +import java.util.Set; | ||
| 9 | 9 | ||
| 10 | /** | 10 | /** |
| 11 | * 登录用户身份权限 | 11 | * 登录用户身份权限 |
| @@ -71,6 +71,24 @@ public class LoginUser implements UserDetails | @@ -71,6 +71,24 @@ public class LoginUser implements UserDetails | ||
| 71 | */ | 71 | */ |
| 72 | private SysUser user; | 72 | private SysUser user; |
| 73 | 73 | ||
| 74 | + public LoginUser() | ||
| 75 | + { | ||
| 76 | + } | ||
| 77 | + | ||
| 78 | + public LoginUser(SysUser user, Set<String> permissions) | ||
| 79 | + { | ||
| 80 | + this.user = user; | ||
| 81 | + this.permissions = permissions; | ||
| 82 | + } | ||
| 83 | + | ||
| 84 | + public LoginUser(Long userId, Long deptId, SysUser user, Set<String> permissions) | ||
| 85 | + { | ||
| 86 | + this.userId = userId; | ||
| 87 | + this.deptId = deptId; | ||
| 88 | + this.user = user; | ||
| 89 | + this.permissions = permissions; | ||
| 90 | + } | ||
| 91 | + | ||
| 74 | public Long getUserId() | 92 | public Long getUserId() |
| 75 | { | 93 | { |
| 76 | return userId; | 94 | return userId; |
| @@ -101,24 +119,6 @@ public class LoginUser implements UserDetails | @@ -101,24 +119,6 @@ public class LoginUser implements UserDetails | ||
| 101 | this.token = token; | 119 | this.token = token; |
| 102 | } | 120 | } |
| 103 | 121 | ||
| 104 | - public LoginUser() | ||
| 105 | - { | ||
| 106 | - } | ||
| 107 | - | ||
| 108 | - public LoginUser(SysUser user, Set<String> permissions) | ||
| 109 | - { | ||
| 110 | - this.user = user; | ||
| 111 | - this.permissions = permissions; | ||
| 112 | - } | ||
| 113 | - | ||
| 114 | - public LoginUser(Long userId, Long deptId, SysUser user, Set<String> permissions) | ||
| 115 | - { | ||
| 116 | - this.userId = userId; | ||
| 117 | - this.deptId = deptId; | ||
| 118 | - this.user = user; | ||
| 119 | - this.permissions = permissions; | ||
| 120 | - } | ||
| 121 | - | ||
| 122 | @JSONField(serialize = false) | 122 | @JSONField(serialize = false) |
| 123 | @Override | 123 | @Override |
| 124 | public String getPassword() | 124 | public String getPassword() |
| @@ -41,7 +41,7 @@ | @@ -41,7 +41,7 @@ | ||
| 41 | <artifactId>kaptcha</artifactId> | 41 | <artifactId>kaptcha</artifactId> |
| 42 | <exclusions> | 42 | <exclusions> |
| 43 | <exclusion> | 43 | <exclusion> |
| 44 | - <artifactId>javax.servlet-api</artifactId> | 44 | + <artifactId>servlet-api</artifactId> |
| 45 | <groupId>javax.servlet</groupId> | 45 | <groupId>javax.servlet</groupId> |
| 46 | </exclusion> | 46 | </exclusion> |
| 47 | </exclusions> | 47 | </exclusions> |
| @@ -62,7 +62,7 @@ public class PermissionService | @@ -62,7 +62,7 @@ public class PermissionService | ||
| 62 | /** | 62 | /** |
| 63 | * 验证用户是否具有以下任意一个权限 | 63 | * 验证用户是否具有以下任意一个权限 |
| 64 | * | 64 | * |
| 65 | - * @param permissions 以 PERMISSION_NAMES_DELIMETER 为分隔符的权限列表 | 65 | + * @param permissions 以 PERMISSION_DELIMETER 为分隔符的权限列表 |
| 66 | * @return 用户是否具有以下任意一个权限 | 66 | * @return 用户是否具有以下任意一个权限 |
| 67 | */ | 67 | */ |
| 68 | public boolean hasAnyPermi(String permissions) | 68 | public boolean hasAnyPermi(String permissions) |
-
请 注册 或 登录 后发表评论