mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-02 03:58:33 +08:00
简化后端
This commit is contained in:
parent
04a804f065
commit
80f3e74a61
@ -51,11 +51,6 @@
|
|||||||
</exclusion>
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.github.theborakompanioni</groupId>
|
|
||||||
<artifactId>thymeleaf-extras-shiro</artifactId>
|
|
||||||
<version>2.0.0</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
@ -173,21 +168,7 @@
|
|||||||
<skipTests>true</skipTests>
|
<skipTests>true</skipTests>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-source-plugin</artifactId>
|
|
||||||
<version>3.0.0</version>
|
|
||||||
<configuration>
|
|
||||||
<attach>true</attach>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>attach-sources</id>
|
|
||||||
<goals>
|
|
||||||
<goal>jar</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package io.metersphere.config;
|
package io.metersphere.config;
|
||||||
|
|
||||||
import at.pollux.thymeleaf.shiro.dialect.ShiroDialect;
|
|
||||||
import io.metersphere.security.LoginFilter;
|
import io.metersphere.security.LoginFilter;
|
||||||
import io.metersphere.security.ShiroDBRealm;
|
import io.metersphere.security.ShiroDBRealm;
|
||||||
import org.apache.shiro.cache.MemoryConstrainedCacheManager;
|
import org.apache.shiro.cache.MemoryConstrainedCacheManager;
|
||||||
@ -100,11 +99,6 @@ public class ShiroConfig {
|
|||||||
return daap;
|
return daap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean(name = "shiroDialect")
|
|
||||||
public ShiroDialect shiroDialect() {
|
|
||||||
return new ShiroDialect();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public AuthorizationAttributeSourceAdvisor getAuthorizationAttributeSourceAdvisor(DefaultWebSecurityManager sessionManager) {
|
public AuthorizationAttributeSourceAdvisor getAuthorizationAttributeSourceAdvisor(DefaultWebSecurityManager sessionManager) {
|
||||||
AuthorizationAttributeSourceAdvisor aasa = new AuthorizationAttributeSourceAdvisor();
|
AuthorizationAttributeSourceAdvisor aasa = new AuthorizationAttributeSourceAdvisor();
|
||||||
|
@ -4,18 +4,14 @@ import io.metersphere.user.SessionUtils;
|
|||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping
|
@RequestMapping
|
||||||
public class IndexController {
|
public class IndexController {
|
||||||
|
|
||||||
@RequestMapping(value = "/", method = RequestMethod.GET)
|
@GetMapping(value = "/")
|
||||||
public ModelAndView index() {
|
public String index() {
|
||||||
ModelAndView modelAndView = new ModelAndView();
|
return "index";
|
||||||
modelAndView.setViewName("index");
|
|
||||||
return modelAndView;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping(value = "/login")
|
@GetMapping(value = "/login")
|
||||||
|
@ -2,6 +2,7 @@ package io.metersphere.interceptor;
|
|||||||
|
|
||||||
import io.metersphere.commons.utils.BeanUtils;
|
import io.metersphere.commons.utils.BeanUtils;
|
||||||
import io.metersphere.commons.utils.MybatisInterceptorConfig;
|
import io.metersphere.commons.utils.MybatisInterceptorConfig;
|
||||||
|
import org.apache.commons.collections.MapUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.ibatis.cache.CacheKey;
|
import org.apache.ibatis.cache.CacheKey;
|
||||||
import org.apache.ibatis.executor.Executor;
|
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.plugin.*;
|
||||||
import org.apache.ibatis.session.ResultHandler;
|
import org.apache.ibatis.session.ResultHandler;
|
||||||
import org.apache.ibatis.session.RowBounds;
|
import org.apache.ibatis.session.RowBounds;
|
||||||
import org.thymeleaf.util.MapUtils;
|
|
||||||
|
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
Loading…
Reference in New Issue
Block a user