当前位置: 代码迷 >> 综合 >> renren-security如何在前端freemarker中使用shiro标签??
  详细解决方案

renren-security如何在前端freemarker中使用shiro标签??

热度:67   发布时间:2024-01-15 09:08:48.0

直接上干货

首先引用jar包

<!-- shiro-freemarker-tags start --><dependency><groupId>net.mingsoft</groupId><artifactId>shiro-freemarker-tags</artifactId><version>1.0.2</version><exclusions><exclusion><groupId>org.apache.shiro</groupId><artifactId>shiro-all</artifactId></exclusion><exclusion><groupId>org.freemarker</groupId><artifactId>freemarker</artifactId></exclusion></exclusions></dependency><!-- shiro-freemarker-tags end -->

然后是修改freemarker配置

@Configuration
public class FreemarkerConfig {@Beanpublic FreeMarkerConfigurer freeMarkerConfigurer(ShiroTag shiroTag){FreeMarkerConfigurer configurer = new FreeMarkerConfigurer();configurer.setTemplat
  相关解决方案