From 80f3e74a617e069a37d5b3cbdf0efca443bd1a39 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Mon, 2 Mar 2020 18:41:47 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=80=E5=8C=96=E5=90=8E=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/pom.xml | 21 +------------------ .../io/metersphere/config/ShiroConfig.java | 6 ------ .../controller/IndexController.java | 10 +++------ .../interceptor/MybatisInterceptor.java | 2 +- 4 files changed, 5 insertions(+), 34 deletions(-) diff --git a/backend/pom.xml b/backend/pom.xml index 26a5020717..4ef4babb82 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -51,11 +51,6 @@ - - com.github.theborakompanioni - thymeleaf-extras-shiro - 2.0.0 - org.springframework.boot @@ -173,21 +168,7 @@ true - - maven-source-plugin - 3.0.0 - - true - - - - attach-sources - - jar - - - - + org.apache.maven.plugins maven-compiler-plugin diff --git a/backend/src/main/java/io/metersphere/config/ShiroConfig.java b/backend/src/main/java/io/metersphere/config/ShiroConfig.java index e8027d8db0..f91b8a65b4 100644 --- a/backend/src/main/java/io/metersphere/config/ShiroConfig.java +++ b/backend/src/main/java/io/metersphere/config/ShiroConfig.java @@ -1,6 +1,5 @@ package io.metersphere.config; -import at.pollux.thymeleaf.shiro.dialect.ShiroDialect; import io.metersphere.security.LoginFilter; import io.metersphere.security.ShiroDBRealm; import org.apache.shiro.cache.MemoryConstrainedCacheManager; @@ -100,11 +99,6 @@ public class ShiroConfig { return daap; } - @Bean(name = "shiroDialect") - public ShiroDialect shiroDialect() { - return new ShiroDialect(); - } - @Bean public AuthorizationAttributeSourceAdvisor getAuthorizationAttributeSourceAdvisor(DefaultWebSecurityManager sessionManager) { AuthorizationAttributeSourceAdvisor aasa = new AuthorizationAttributeSourceAdvisor(); diff --git a/backend/src/main/java/io/metersphere/controller/IndexController.java b/backend/src/main/java/io/metersphere/controller/IndexController.java index e90dd0ea10..4785794b7f 100644 --- a/backend/src/main/java/io/metersphere/controller/IndexController.java +++ b/backend/src/main/java/io/metersphere/controller/IndexController.java @@ -4,18 +4,14 @@ import io.metersphere.user.SessionUtils; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.servlet.ModelAndView; @Controller @RequestMapping public class IndexController { - @RequestMapping(value = "/", method = RequestMethod.GET) - public ModelAndView index() { - ModelAndView modelAndView = new ModelAndView(); - modelAndView.setViewName("index"); - return modelAndView; + @GetMapping(value = "/") + public String index() { + return "index"; } @GetMapping(value = "/login") diff --git a/backend/src/main/java/io/metersphere/interceptor/MybatisInterceptor.java b/backend/src/main/java/io/metersphere/interceptor/MybatisInterceptor.java index 13e0c92a98..2c79abafd0 100644 --- a/backend/src/main/java/io/metersphere/interceptor/MybatisInterceptor.java +++ b/backend/src/main/java/io/metersphere/interceptor/MybatisInterceptor.java @@ -2,6 +2,7 @@ package io.metersphere.interceptor; import io.metersphere.commons.utils.BeanUtils; import io.metersphere.commons.utils.MybatisInterceptorConfig; +import org.apache.commons.collections.MapUtils; import org.apache.commons.lang3.StringUtils; import org.apache.ibatis.cache.CacheKey; import org.apache.ibatis.executor.Executor; @@ -10,7 +11,6 @@ import org.apache.ibatis.mapping.MappedStatement; import org.apache.ibatis.plugin.*; import org.apache.ibatis.session.ResultHandler; import org.apache.ibatis.session.RowBounds; -import org.thymeleaf.util.MapUtils; import java.lang.reflect.Method; import java.util.*;