shiro dialect

This commit is contained in:
Captain.B 2020-02-03 14:28:08 +08:00
parent c27167a3ba
commit da8e7b101d
2 changed files with 6 additions and 2 deletions

View File

@ -40,7 +40,6 @@
<artifactId>spring-boot-starter</artifactId>
</dependency>
<!--
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
@ -56,7 +55,6 @@
<artifactId>thymeleaf-extras-shiro</artifactId>
<version>2.0.0</version>
</dependency>
-->
<dependency>
<groupId>org.springframework.boot</groupId>

View File

@ -1,5 +1,6 @@
package com.fit2cloud.metersphere.config;
import at.pollux.thymeleaf.shiro.dialect.ShiroDialect;
import com.fit2cloud.metersphere.security.LoginFilter;
import com.fit2cloud.metersphere.security.ShiroDBRealm;
import org.apache.shiro.cache.MemoryConstrainedCacheManager;
@ -99,6 +100,11 @@ public class ShiroConfig {
return daap;
}
@Bean(name = "shiroDialect")
public ShiroDialect shiroDialect() {
return new ShiroDialect();
}
@Bean
public AuthorizationAttributeSourceAdvisor getAuthorizationAttributeSourceAdvisor(DefaultWebSecurityManager sessionManager) {
AuthorizationAttributeSourceAdvisor aasa = new AuthorizationAttributeSourceAdvisor();