首页 文章 精选 留言 我的

精选列表

搜索[spring],共10000篇文章
优秀的个人博客,低调大师

在spring boot项目中,如何整合freemarker与shiro标签使用

一、导入依赖包 <!--freemarker+shiro(标签)--> <dependency> <groupId>net.mingsoft</groupId> <artifactId>shiro-freemarker-tags</artifactId> <version>0.1</version> </dependency> 二、在项目中添加配置 packagecom.web.common.config; importorg.springframework.beans.factory.InitializingBean; importorg.springframework.beans.factory.annotation.Autowired; importorg.springframework.stereotype.Component; importcom.jagregory.shiro.freemarker.ShiroTags; importfreemarker.template.Configuration; @Component publicclassPlatformFreeMarkerConfigurerimplementsInitializingBean{ @Autowired privateConfigurationconfiguration; @Override publicvoidafterPropertiesSet()throwsException{ //加上这句后,可以在页面上使用shiro标签 configuration.setSharedVariable("shiro",newShiroTags()); } } 三、 <@shiro.hasPermissionname="admin:add"> <ahref="${base}/admin/user/role/add">添加角色</a> </@shiro.hasPermission> <@shiro.hasPermissionname="admin:update"> <ahref="${base}/admin/user/role/edit?id=${bean.id}">修改</a> <ahref="${base}/admin/user/role/delete?id=${bean.id}">删除</a> </@shiro.hasPermission>

资源下载

更多资源
Mario

Mario

马里奥是站在游戏界顶峰的超人气多面角色。马里奥靠吃蘑菇成长,特征是大鼻子、头戴帽子、身穿背带裤,还留着胡子。与他的双胞胎兄弟路易基一起,长年担任任天堂的招牌角色。

Spring

Spring

Spring框架(Spring Framework)是由Rod Johnson于2002年提出的开源Java企业级应用框架,旨在通过使用JavaBean替代传统EJB实现方式降低企业级编程开发的复杂性。该框架基于简单性、可测试性和松耦合性设计理念,提供核心容器、应用上下文、数据访问集成等模块,支持整合Hibernate、Struts等第三方框架,其适用范围不仅限于服务器端开发,绝大多数Java应用均可从中受益。

Rocky Linux

Rocky Linux

Rocky Linux(中文名:洛基)是由Gregory Kurtzer于2020年12月发起的企业级Linux发行版,作为CentOS稳定版停止维护后与RHEL(Red Hat Enterprise Linux)完全兼容的开源替代方案,由社区拥有并管理,支持x86_64、aarch64等架构。其通过重新编译RHEL源代码提供长期稳定性,采用模块化包装和SELinux安全架构,默认包含GNOME桌面环境及XFS文件系统,支持十年生命周期更新。

Sublime Text

Sublime Text

Sublime Text具有漂亮的用户界面和强大的功能,例如代码缩略图,Python的插件,代码段等。还可自定义键绑定,菜单和工具栏。Sublime Text 的主要功能包括:拼写检查,书签,完整的 Python API , Goto 功能,即时项目切换,多选择,多窗口等等。Sublime Text 是一个跨平台的编辑器,同时支持Windows、Linux、Mac OS X等操作系统。

用户登录
用户注册
修改密码
忘记密码