Skip to content

Commit f50d915

Browse files
committed
1、优化文件存放位置;
2、新增banner.txt,启动过程更花里胡哨;
1 parent 4f6505b commit f50d915

366 files changed

Lines changed: 416 additions & 438 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎src/main/java/cn/huanzi/qch/baseadmin/BaseAdminApplication.java‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,15 @@ public ModelAndView login(){
115115
/**
116116
* 跳转首页
117117
*/
118+
@GetMapping("")
119+
public void index1(HttpServletResponse response){
120+
//内部重定向
121+
try {
122+
response.sendRedirect("/index");
123+
} catch (IOException e) {
124+
e.printStackTrace();
125+
}
126+
}
118127
@GetMapping("index")
119128
public ModelAndView index(){
120129
ModelAndView modelAndView = new ModelAndView("index");

‎src/main/java/cn/huanzi/qch/baseadmin/aspect/SafetyAspect.java‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,12 @@ public class SafetyAspect {
3434
/**
3535
* Pointcut 切入点
3636
* 匹配
37-
* cn.huanzi.qch.baseadmin.sys.sysauthority.controller、
38-
* cn.huanzi.qch.baseadmin.user.controller包下面的所有方法
37+
* cn.huanzi.qch.baseadmin.sys.*.controller、
38+
* cn.huanzi.qch.baseadmin.*.controller包下面的所有方法
3939
*/
4040
@Pointcut(value = "execution(public * cn.huanzi.qch.baseadmin.sys.*.controller.*.*(..)) || " +
4141
"execution(public * cn.huanzi.qch.baseadmin.*.controller.*.*(..))")
42-
public void safetyAspect() {
43-
}
42+
public void safetyAspect() {}
4443

4544
/**
4645
* 环绕通知

‎src/main/java/cn/huanzi/qch/baseadmin/config/security/CaptchaFilterConfig.java‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,17 @@ public class CaptchaFilterConfig implements Filter {
3232
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
3333
HttpServletRequest request = (HttpServletRequest) servletRequest;
3434
HttpServletResponse response = (HttpServletResponse) servletResponse;
35-
//前端公钥
36-
String publicKey = null;
37-
38-
//jackson
39-
ObjectMapper mapper = new ObjectMapper();
40-
//jackson 序列化和反序列化 date处理
41-
mapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
4235

4336
//只拦截登录请求,且开发环境下不拦截
4437
if ("POST".equals(request.getMethod()) && "/login".equals(request.getRequestURI())) {
38+
//前端公钥
39+
String publicKey = null;
40+
41+
//jackson
42+
ObjectMapper mapper = new ObjectMapper();
43+
//jackson 序列化和反序列化 date处理
44+
mapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
45+
4546
//解密
4647
try {
4748
//AES加密后的数据

‎src/main/java/cn/huanzi/qch/baseadmin/config/security/ErrorPageFilterConfig.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,16 @@ public void doFilter(ServletRequest servletRequest, ServletResponse servletRespo
3434
class ErrorPageController {
3535
@GetMapping("/error/403")
3636
public ModelAndView error403(){
37-
return new ModelAndView("error/403");
37+
return new ModelAndView("common/error/403");
3838
}
3939

4040
@GetMapping("/error/404")
4141
public ModelAndView error404(){
42-
return new ModelAndView("error/404");
42+
return new ModelAndView("common/error/404");
4343
}
4444

4545
@GetMapping("/error/500")
4646
public ModelAndView error500(){
47-
return new ModelAndView("error/500");
47+
return new ModelAndView("common/error/500");
4848
}
4949
}

‎src/main/java/cn/huanzi/qch/baseadmin/config/security/SecurityConfig.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ protected void configure(HttpSecurity http) throws Exception {
7474
.addFilterBefore(captchaFilterConfig, UsernamePasswordAuthenticationFilter.class)
7575
.formLogin()
7676
.loginProcessingUrl("/login")
77+
//未登录时默认跳转页面
7778
.loginPage("/loginPage")
7879
.failureHandler(loginFailureHandlerConfig)
7980
.successHandler(loginSuccessHandlerConfig)

‎src/main/resources/banner.txt‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
${AnsiColor.BRIGHT_YELLOW}
2+
____ _ _
3+
| _ \ /\ | | (_)
4+
| |_) | __ _ ___ ___ / \ __| | _ __ ___ _ _ __
5+
| _ < / _` | / __| / _ \ / /\ \ / _` | | '_ ` _ \ | | | '_ \
6+
| |_) | | (_| | \__ \ | __/ / ____ \ | (_| | | | | | | | | | | | | |
7+
|____/ \__,_| |___/ \___| /_/ \_\ \__,_| |_| |_| |_| |_| |_| |_|
8+
9+
10+
____ _ _ _
11+
| _ \ | | (_) | |
12+
| |_) | _ _ | |__ _ _ __ _ _ __ ____ _ ______ __ _ ___ | |__
13+
| _ < | | | | | '_ \ | | | | / _` | | '_ \ |_ / | | |______| / _` | / __| | '_ \
14+
| |_) | | |_| | | | | | | |_| | | (_| | | | | | / / | | | (_| | | (__ | | | |
15+
|____/ \__, | |_| |_| \__,_| \__,_| |_| |_| /___| |_| \__, | \___| |_| |_|
16+
__/ | | |
17+
|___/ |_|
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
body, html {
2+
margin: 0;
3+
padding: 0;
4+
}

0 commit comments

Comments
 (0)