mirror of https://github.com/elunez/eladmin
Merge branch 'fork_master' into master
commit
3d3e77dd98
|
@ -1,4 +1,4 @@
|
||||||
<h1 style="text-align: center">EL-ADMIN 后台管理系统</h1>
|
<h1 style="text-align: center">ELADMIN 后台管理系统</h1>
|
||||||
<div style="text-align: center">
|
<div style="text-align: center">
|
||||||
|
|
||||||
[](https://github.com/elunez/eladmin/blob/master/LICENSE)
|
[](https://github.com/elunez/eladmin/blob/master/LICENSE)
|
||||||
|
@ -11,9 +11,9 @@
|
||||||
#### 项目简介
|
#### 项目简介
|
||||||
一个基于 Spring Boot 2.1.0 、 Spring Boot Jpa、 JWT、Spring Security、Redis、Vue的前后端分离的后台管理系统
|
一个基于 Spring Boot 2.1.0 、 Spring Boot Jpa、 JWT、Spring Security、Redis、Vue的前后端分离的后台管理系统
|
||||||
|
|
||||||
**开发文档:** [https://el-admin.vip](https://el-admin.vip)
|
**开发文档:** [https://eladmin.vip](https://eladmin.vip)
|
||||||
|
|
||||||
**体验地址:** [https://el-admin.vip/demo](https://el-admin.vip/demo)
|
**体验地址:** [https://eladmin.vip/demo](https://eladmin.vip/demo)
|
||||||
|
|
||||||
**账号密码:** `admin / 123456`
|
**账号密码:** `admin / 123456`
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@
|
||||||
- 感谢 [d15801543974](https://github.com/d15801543974) 大佬提供的基于注解的通用查询方式
|
- 感谢 [d15801543974](https://github.com/d15801543974) 大佬提供的基于注解的通用查询方式
|
||||||
|
|
||||||
#### 项目捐赠
|
#### 项目捐赠
|
||||||
项目的发展离不开你的支持,请作者喝杯咖啡吧☕ [Donate](https://el-admin.vip/donation/)
|
项目的发展离不开你的支持,请作者喝杯咖啡吧☕ [Donate](https://eladmin.vip/donation/)
|
||||||
|
|
||||||
#### 反馈交流
|
#### 反馈交流
|
||||||
- QQ交流群:一群:<strike>891137268</strike> 、二群:<strike>947578238</strike>、三群:659622532
|
- QQ交流群:一群:<strike>891137268</strike> 、二群:<strike>947578238</strike>、三群:659622532
|
|
@ -28,7 +28,7 @@ import java.lang.annotation.Target;
|
||||||
* 应该是 @DataPermission(joinName = "dept", fieldName = "id")
|
* 应该是 @DataPermission(joinName = "dept", fieldName = "id")
|
||||||
* </p>
|
* </p>
|
||||||
* @author Zheng Jie
|
* @author Zheng Jie
|
||||||
* @website https://el-admin.vip
|
* @website https://eladmin.vip
|
||||||
* @date 2020-05-07
|
* @date 2020-05-07
|
||||||
**/
|
**/
|
||||||
@Target(ElementType.TYPE)
|
@Target(ElementType.TYPE)
|
||||||
|
|
|
@ -106,7 +106,7 @@ public class RedisConfig extends CachingConfigurerSupport {
|
||||||
@Override
|
@Override
|
||||||
public KeyGenerator keyGenerator() {
|
public KeyGenerator keyGenerator() {
|
||||||
return (target, method, params) -> {
|
return (target, method, params) -> {
|
||||||
Map<String,Object> container = new HashMap<>(4);
|
Map<String,Object> container = new HashMap<>(8);
|
||||||
Class<?> targetClassClass = target.getClass();
|
Class<?> targetClassClass = target.getClass();
|
||||||
// 类地址
|
// 类地址
|
||||||
container.put("class",targetClassClass.toGenericString());
|
container.put("class",targetClassClass.toGenericString());
|
||||||
|
|
|
@ -21,7 +21,7 @@ import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Zheng Jie
|
* @author Zheng Jie
|
||||||
* @website https://el-admin.vip
|
* @website https://eladmin.vip
|
||||||
* @description
|
* @description
|
||||||
* @date 2020-05-18
|
* @date 2020-05-18
|
||||||
**/
|
**/
|
||||||
|
|
|
@ -77,7 +77,7 @@ public class SwaggerConfig {
|
||||||
private ApiInfo apiInfo() {
|
private ApiInfo apiInfo() {
|
||||||
return new ApiInfoBuilder()
|
return new ApiInfoBuilder()
|
||||||
.description("一个简单且易上手的 Spring boot 后台管理框架")
|
.description("一个简单且易上手的 Spring boot 后台管理框架")
|
||||||
.title("EL-ADMIN 接口文档")
|
.title("ELADMIN 接口文档")
|
||||||
.version("2.6")
|
.version("2.6")
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ import java.io.Closeable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Zheng Jie
|
* @author Zheng Jie
|
||||||
* @website https://el-admin.vip
|
* @website https://eladmin.vip
|
||||||
* @description 用于关闭各种连接,缺啥补啥
|
* @description 用于关闭各种连接,缺啥补啥
|
||||||
* @date 2021-03-05
|
* @date 2021-03-05
|
||||||
**/
|
**/
|
||||||
|
|
|
@ -20,7 +20,7 @@ import lombok.Getter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Zheng Jie
|
* @author Zheng Jie
|
||||||
* @website https://el-admin.vip
|
* @website https://eladmin.vip
|
||||||
* @description
|
* @description
|
||||||
* @date 2020-06-10
|
* @date 2020-06-10
|
||||||
**/
|
**/
|
||||||
|
|
|
@ -96,9 +96,9 @@ public class LogServiceImpl implements LogService {
|
||||||
log.setUsername(username);
|
log.setUsername(username);
|
||||||
log.setParams(getParameter(method, joinPoint.getArgs()));
|
log.setParams(getParameter(method, joinPoint.getArgs()));
|
||||||
// 记录登录用户,隐藏密码信息
|
// 记录登录用户,隐藏密码信息
|
||||||
if(log.getDescription().equals("用户登录")){
|
if(signature.getName().equals("login") && StringUtils.isNotEmpty(log.getParams())){
|
||||||
JSONObject obj = JSONUtil.parseObj(log.getParams());
|
JSONObject obj = JSONUtil.parseObj(log.getParams());
|
||||||
log.setUsername(obj.get("username").toString());
|
log.setUsername(obj.getStr("username", ""));
|
||||||
log.setParams(JSONUtil.toJsonStr(Dict.create().set("username", log.getUsername())));
|
log.setParams(JSONUtil.toJsonStr(Dict.create().set("username", log.getUsername())));
|
||||||
}
|
}
|
||||||
log.setBrowser(browser);
|
log.setBrowser(browser);
|
||||||
|
@ -120,7 +120,7 @@ public class LogServiceImpl implements LogService {
|
||||||
//将RequestParam注解修饰的参数作为请求参数
|
//将RequestParam注解修饰的参数作为请求参数
|
||||||
RequestParam requestParam = parameters[i].getAnnotation(RequestParam.class);
|
RequestParam requestParam = parameters[i].getAnnotation(RequestParam.class);
|
||||||
if (requestParam != null) {
|
if (requestParam != null) {
|
||||||
Map<String, Object> map = new HashMap<>(4);
|
Map<String, Object> map = new HashMap<>(2);
|
||||||
String key = parameters[i].getName();
|
String key = parameters[i].getName();
|
||||||
if (!StringUtils.isEmpty(requestParam.value())) {
|
if (!StringUtils.isEmpty(requestParam.value())) {
|
||||||
key = requestParam.value();
|
key = requestParam.value();
|
||||||
|
|
|
@ -68,33 +68,31 @@ public class LoginProperties {
|
||||||
*/
|
*/
|
||||||
private Captcha switchCaptcha(LoginCode loginCode) {
|
private Captcha switchCaptcha(LoginCode loginCode) {
|
||||||
Captcha captcha;
|
Captcha captcha;
|
||||||
synchronized (this) {
|
switch (loginCode.getCodeType()) {
|
||||||
switch (loginCode.getCodeType()) {
|
case ARITHMETIC:
|
||||||
case ARITHMETIC:
|
// 算术类型 https://gitee.com/whvse/EasyCaptcha
|
||||||
// 算术类型 https://gitee.com/whvse/EasyCaptcha
|
captcha = new FixedArithmeticCaptcha(loginCode.getWidth(), loginCode.getHeight());
|
||||||
captcha = new FixedArithmeticCaptcha(loginCode.getWidth(), loginCode.getHeight());
|
// 几位数运算,默认是两位
|
||||||
// 几位数运算,默认是两位
|
captcha.setLen(loginCode.getLength());
|
||||||
captcha.setLen(loginCode.getLength());
|
break;
|
||||||
break;
|
case CHINESE:
|
||||||
case CHINESE:
|
captcha = new ChineseCaptcha(loginCode.getWidth(), loginCode.getHeight());
|
||||||
captcha = new ChineseCaptcha(loginCode.getWidth(), loginCode.getHeight());
|
captcha.setLen(loginCode.getLength());
|
||||||
captcha.setLen(loginCode.getLength());
|
break;
|
||||||
break;
|
case CHINESE_GIF:
|
||||||
case CHINESE_GIF:
|
captcha = new ChineseGifCaptcha(loginCode.getWidth(), loginCode.getHeight());
|
||||||
captcha = new ChineseGifCaptcha(loginCode.getWidth(), loginCode.getHeight());
|
captcha.setLen(loginCode.getLength());
|
||||||
captcha.setLen(loginCode.getLength());
|
break;
|
||||||
break;
|
case GIF:
|
||||||
case GIF:
|
captcha = new GifCaptcha(loginCode.getWidth(), loginCode.getHeight());
|
||||||
captcha = new GifCaptcha(loginCode.getWidth(), loginCode.getHeight());
|
captcha.setLen(loginCode.getLength());
|
||||||
captcha.setLen(loginCode.getLength());
|
break;
|
||||||
break;
|
case SPEC:
|
||||||
case SPEC:
|
captcha = new SpecCaptcha(loginCode.getWidth(), loginCode.getHeight());
|
||||||
captcha = new SpecCaptcha(loginCode.getWidth(), loginCode.getHeight());
|
captcha.setLen(loginCode.getLength());
|
||||||
captcha.setLen(loginCode.getLength());
|
break;
|
||||||
break;
|
default:
|
||||||
default:
|
throw new BadConfigurationException("验证码配置信息错误!正确配置查看 LoginCodeEnum ");
|
||||||
throw new BadConfigurationException("验证码配置信息错误!正确配置查看 LoginCodeEnum ");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if(StringUtils.isNotBlank(loginCode.getFontName())){
|
if(StringUtils.isNotBlank(loginCode.getFontName())){
|
||||||
captcha.setFont(new Font(loginCode.getFontName(), Font.PLAIN, loginCode.getFontSize()));
|
captcha.setFont(new Font(loginCode.getFontName(), Font.PLAIN, loginCode.getFontSize()));
|
||||||
|
|
|
@ -30,7 +30,7 @@ import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Zheng Jie
|
* @author Zheng Jie
|
||||||
* @website https://el-admin.vip
|
* @website https://eladmin.vip
|
||||||
* @description 数据权限服务实现
|
* @description 数据权限服务实现
|
||||||
* @date 2020-05-07
|
* @date 2020-05-07
|
||||||
**/
|
**/
|
||||||
|
|
|
@ -60,11 +60,11 @@ public class VerifyServiceImpl implements VerifyService {
|
||||||
throw new BadRequestException("服务异常,请联系网站负责人");
|
throw new BadRequestException("服务异常,请联系网站负责人");
|
||||||
}
|
}
|
||||||
content = template.render(Dict.create().set("code",code));
|
content = template.render(Dict.create().set("code",code));
|
||||||
emailVo = new EmailVo(Collections.singletonList(email),"EL-ADMIN后台管理系统",content);
|
emailVo = new EmailVo(Collections.singletonList(email),"ELADMIN后台管理系统",content);
|
||||||
// 存在就再次发送原来的验证码
|
// 存在就再次发送原来的验证码
|
||||||
} else {
|
} else {
|
||||||
content = template.render(Dict.create().set("code",oldCode));
|
content = template.render(Dict.create().set("code",oldCode));
|
||||||
emailVo = new EmailVo(Collections.singletonList(email),"EL-ADMIN后台管理系统",content);
|
emailVo = new EmailVo(Collections.singletonList(email),"ELADMIN后台管理系统",content);
|
||||||
}
|
}
|
||||||
return emailVo;
|
return emailVo;
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
padding: 20px 0px;
|
padding: 20px 0px;
|
||||||
font-family: Microsoft YaHei;">
|
font-family: Microsoft YaHei;">
|
||||||
Copyright ©${.now?string("yyyy")} <a hover="color: #DA251D;" style="color: #999;" href="https://github.com/elunez/eladmin" target="_blank">EL-ADMIN</a> 后台管理系统 All Rights Reserved.
|
Copyright ©${.now?string("yyyy")} <a hover="color: #DA251D;" style="color: #999;" href="https://github.com/elunez/eladmin" target="_blank">ELADMIN</a> 后台管理系统 All Rights Reserved.
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
padding: 20px 0px;
|
padding: 20px 0px;
|
||||||
font-family: Microsoft YaHei;">
|
font-family: Microsoft YaHei;">
|
||||||
Copyright ©${.now?string("yyyy")} <a hover="color: #DA251D;" style="color: #999;" href="https://github.com/elunez/eladmin" target="_blank">EL-ADMIN</a> 后台管理系统 All Rights Reserved.
|
Copyright ©${.now?string("yyyy")} <a hover="color: #DA251D;" style="color: #999;" href="https://github.com/elunez/eladmin" target="_blank">ELADMIN</a> 后台管理系统 All Rights Reserved.
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -31,7 +31,7 @@ import java.io.IOException;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @website https://el-admin.vip
|
* @website https://eladmin.vip
|
||||||
* @author ${author}
|
* @author ${author}
|
||||||
* @date ${date}
|
* @date ${date}
|
||||||
**/
|
**/
|
||||||
|
|
|
@ -29,7 +29,7 @@ import com.alibaba.fastjson.serializer.ToStringSerializer;
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @website https://el-admin.vip
|
* @website https://eladmin.vip
|
||||||
* @description /
|
* @description /
|
||||||
* @author ${author}
|
* @author ${author}
|
||||||
* @date ${date}
|
* @date ${date}
|
||||||
|
|
|
@ -37,7 +37,7 @@ import java.math.BigDecimal;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @website https://el-admin.vip
|
* @website https://eladmin.vip
|
||||||
* @description /
|
* @description /
|
||||||
* @author ${author}
|
* @author ${author}
|
||||||
* @date ${date}
|
* @date ${date}
|
||||||
|
|
|
@ -22,7 +22,7 @@ import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.ReportingPolicy;
|
import org.mapstruct.ReportingPolicy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @website https://el-admin.vip
|
* @website https://eladmin.vip
|
||||||
* @author ${author}
|
* @author ${author}
|
||||||
* @date ${date}
|
* @date ${date}
|
||||||
**/
|
**/
|
||||||
|
|
|
@ -30,7 +30,7 @@ import me.zhengjie.annotation.Query;
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @website https://el-admin.vip
|
* @website https://eladmin.vip
|
||||||
* @author ${author}
|
* @author ${author}
|
||||||
* @date ${date}
|
* @date ${date}
|
||||||
**/
|
**/
|
||||||
|
|
|
@ -20,7 +20,7 @@ import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @website https://el-admin.vip
|
* @website https://eladmin.vip
|
||||||
* @author ${author}
|
* @author ${author}
|
||||||
* @date ${date}
|
* @date ${date}
|
||||||
**/
|
**/
|
||||||
|
|
|
@ -25,7 +25,7 @@ import java.io.IOException;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @website https://el-admin.vip
|
* @website https://eladmin.vip
|
||||||
* @description 服务接口
|
* @description 服务接口
|
||||||
* @author ${author}
|
* @author ${author}
|
||||||
* @date ${date}
|
* @date ${date}
|
||||||
|
|
|
@ -54,7 +54,7 @@ import java.util.ArrayList;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @website https://el-admin.vip
|
* @website https://eladmin.vip
|
||||||
* @description 服务实现
|
* @description 服务实现
|
||||||
* @author ${author}
|
* @author ${author}
|
||||||
* @date ${date}
|
* @date ${date}
|
||||||
|
|
4
pom.xml
4
pom.xml
|
@ -17,8 +17,8 @@
|
||||||
<module>eladmin-generator</module>
|
<module>eladmin-generator</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<name>EL-ADMIN 后台管理</name>
|
<name>ELADMIN 后台管理</name>
|
||||||
<url>https://el-admin.vip</url>
|
<url>https://eladmin.vip</url>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
|
Loading…
Reference in New Issue