spring boot 框架设计步骤
spring boot 框架设计步骤:
1.poem.xml配置
2.application.yml配置
3.entiry实体
4.realm.Myrealm extends AuthorizingRealm权限认证:授权、判断权限
5.config.ShiroConfig权限认证Bean
6.登录页面
1.webapp添加static(css ,js)包
2.登录页面webapp下login.html
3.controller.IndexController类
4.验证码controller存放在session中 7.repository.UserRepository extends JpaRepository<User,Integer>类
8.controller.UserController类 @Controller,@requestMapping("/user")
1.login()类@responseBody,@requestMapping("/login") 9.util.StringUtil工具类static 10.repository.RoleRepository extends JpaRepository<Role,Integer>类@query,nativeQuery=true
1.interfece RoleService接口
2.RoleServiceImpl implement RoleService实现类@Service("RoleService")
3.controller.UserController类 @Controller,@requestMapping("/user") 11.main.html搭建采用easyui
1.webapp添加static(images ,easyui)包
2.登录页面webapp下main.html
3.定义一些icon 12.$("#tree").tree()
1.UserController.loadMenuInfo(HttpSession session)方法
2.repository.MenuRepository extends JpaRepository<Menu,Integer>类@query
3.interfece MenuService接口
4.MenuServiceImpl implement MenuService实现类@Service("MenuService") 13.var context="<iframe ></iframe>";
$("#tabs").tabs("add",{});
if($("#tabs").tabs("exist",node.text)){("#tabs").tabs("select",node.text)} 14.用户管理@Transient不映射
repository.UserRepository extends JpaRepository<User,Integer>,JpaSpecificationExecutor<User,Integer>类
Pageable pageable=new PageRequest();
Predicate predicate=cb.conjunction();
predicate.getExpressions().add();
controller.admin.UserAdminController类 @Controller,@requestMapping("/admin/user")
<table title="" class="easyui-datagrid" fitColumns="true" pagination="true" rownumbers="true" singleSelect="true" url="" fit="true"></table>
<thead><th field="" width="" align=""></th><th></th>..</thead> 15.<form id="fm" method="post">
<table id="" class="easyui-datagrid"><tr><td></td><td></td>..</tr><tr></tr>..</table>
</form> 16.var selectedRows=$("#dg").datagrid("getSelections");
$("#dg").dialog("open").dialog("setTitle",""); 17.显示所有角色
<div id="dlg" class="easyui-dialog" style="width: 450px;height: 300px;padding: 10px 20px"
closed="true" buttons="#dlg-buttons" data-options="onClose:function(){resetValue()}"> 18.shiro认证SimpleAuthorizationInfo info=new SimpleAuthorizationInfo();
info.addStringPermission(menu.getName());info.setRoles();
@RequiresPermissions(value="")
@RequiresPermissions(value={"",""},logical=Logical.OR)
AuthenticationInfo authcInfo=new SimpleAuthenticationInfo(user.getUserName(),user.getPassword(),"xxx"); 19.cascadeCheck:false 不级联
spring boot 框架设计步骤的更多相关文章
- spring boot 框架 启动更新项目,以及生成 "实体_"文件
1.更新项目 clean ---> 更新项目 ---> package--->refresh 即可.(这几个步骤一个不能够少) 2.项目中的类的依赖关系存在,但是无法导入依赖 m ...
- 初识Spring Boot框架(二)之DIY一个Spring Boot的自动配置
在上篇博客初识Spring Boot框架中我们初步见识了SpringBoot的方便之处,很多小伙伴可能也会好奇这个Spring Boot是怎么实现自动配置的,那么今天我就带小伙伴我们自己来实现一个简单 ...
- Spring Boot框架开发的Java项目在CentOS7上的部署
需求:上级拿来一份Spring Boot框架开发的Java项目代码让我在服务器上运行起来,只说了一句该框架是自带了Tomcat(不用重新安装Tomcat),一份代码下有两个项目(一个管理端项目,一个用 ...
- Spring Boot 框架@Temporal(TemporalType.DATE)
使用spring boot框架开发项目时,遇到这样一个问题: 查询pgSQL数据库中表A中某date数据类型的列B,想得到YYYY-MM-DD格式的日期,结果返回的为时间戳(长整型数据). 解决办法: ...
- 在Spring Boot框架下使用WebSocket实现聊天功能
上一篇博客我们介绍了在Spring Boot框架下使用WebSocket实现消息推送,消息推送是一对多,服务器发消息发送给所有的浏览器,这次我们来看看如何使用WebSocket实现消息的一对一发送,模 ...
- 在Spring Boot框架下使用WebSocket实现消息推送
Spring Boot的学习持续进行中.前面两篇博客我们介绍了如何使用Spring Boot容器搭建Web项目(使用Spring Boot开发Web项目)以及怎样为我们的Project添加HTTPS的 ...
- 基于Spring Boot框架开发的一个Mock
背景:在项目后端接口开发还未完成,我们无法进行自动化接口用例的调试,希望与开发同步完成接口自动化用例的编写及调试,待项目转测后,可以直接跑自动化用例,提高测试效率. 选用的maven + Spring ...
- spring boot 学习(二)spring boot 框架整合 thymeleaf
spring boot 框架整合 thymeleaf spring boot 的官方文档中建议开发者使用模板引擎,避免使用 JSP.因为若一定要使用 JSP 将无法使用. 注意:本文主要参考学习了大神 ...
- (Spring Boot框架)快速入门
Spring Boot 系列文章推荐 Spring Boot 入门 Spring Boot 属性配置和使用 Spring Boot 集成MyBatis Spring Boot 静态资源处理 今天介绍一 ...
随机推荐
- Web后台快速开发框架(.NET Core)
Web后台快速开发框架(.NET Core) Coldairarrow 目录 目录 第1章 目录 1 第2章 简介 3 第3章 基础准备 4 3.1 开发环境 ...
- Spring Boot与消息
一.概述 1. 大多应用中,可通过消息服务中间件来提升系统异步通信.扩展解耦能力 2. 消息服务中两个重要概念: 消息代理(message broker)和目的地(destination) 当消息发送 ...
- linux 下ab压力测试
1.ab的简介 ab是apachebench命令的缩写. ab是apache自带的压力测试工具.ab非常实用,它不仅可以对apache服务器进行网站访问压力测试,也可以对或其它类型的服务器进行压力测试 ...
- 【python 字符串】 字符串的相关方法(一)
将字符串首字母变为大写 -> capitalize() 方法 # 将字符串的首字母转换为大写 text = 'alet' ret = text.capitalize() print(ret) ...
- Codeforces Round #520 (Div. 2) B. Math 唯一分解定理+贪心
题意:给出一个x 可以做两种操作 ①sqrt(x) 注意必须是完全平方数 ② x*=k (k为任意数) 问能达到的最小的x是多少 思路: 由题意以及 操作 应该联想到唯一分解定理 经过 ...
- Luogu3768简单的数学题
题目描述 题解 我们在一通化简上面的式子之后得到了这么个东西. 前面的可以除法分块做,后面的∑T2∑dµ(T/d)是积性函数,可以线性筛. 然后这个数据范围好像不太支持线性筛,所以考虑杜教筛. 后面那 ...
- Linux-进程管理
关于进程 Process what is process ? 什么是进程 process life cycle 进程的生命周期 process states 进程状态 什么是进程? 进程是已启动的可执 ...
- nginx 提示the "ssl" directive is deprecated, use the "listen ... ssl" directive instead
该问题是由于新版nginx采用新的方式进行监听https请求了 解决方式 在listen中改为 listen 443 ssl; 删除ssl配置 # ssl on; 完美解决: 解决完成前后的配置如下 ...
- 使用django执行数据更新命令时报错:django.db.migrations.exceptions.InconsistentMigrationHistory: Migration admin.0001_initial is applied before its dependency users.00 01_initial on database 'default'.
如果在重新封装更新用户表之前,已经更新了数据表,在数据库中已经有了django相关的依赖表,就会报错: django.db.migrations.exceptions.InconsistentMigr ...
- php禁止某ip或ip地址段访问的方法(转载)
<?php include("banIP.php");?> 禁用单个ip如下:<?php //禁用ip地址 $ip=$_SERVER["REMOTE_A ...