目录:[持续更新.....] spring 部分常用注解 spring boot 学习之路1(简单入门) spring boot 学习之路2(注解介绍) spring boot 学习之路3( 集成mybatis ) spring boot 学习之路4(日志输出) spring boot 学习之路5(打成war包部署tomcat) spring boot 学习之路6(定时任务) spring boot 学习之路6(集成durid连接池) spring boot 学习之路7(静态页面自动生效问题)…
在springBoot和Myatis   整合中出现springBoot无法启动   并且报以下错误 Description: Field userMapper in cn.lijun.controller.UserController required a bean of type 'cn.lijun.mapper.UserMapper' that could not be found. Action: Consider defining a bean of type 'cn.lijun.ma…
添加mybatis-spring-boot-starter依赖 pox.xml <!--mybatis--> <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>1.3.2</version> </dependency>…
Spring系列之注解配置 Spring是轻代码而重配置的框架,配置比较繁重,影响开发效率,所以注解开发是一种趋势,注解代替xml配置文件可以简化配置,提高开发效率 你本来要写一段很长的代码来构造一个Beam对象,但是如果使用注解的话只要使用一个注解符号即可 下面我们来讲讲一些经常使用的注解符号 @Component 使用类上用于实例化Bean @Controller 使用web层类上用于实例化Bean @Service 使用在Service层类上用于实例化service @Repository…
 Springboot+ Mybatis+MySql整合构建Rest服务(涵盖增.删.改.查) 1.概要 1.1 为什么要使用Spring  boot? 1.1.1 简单方便.配置少.整合了大多数框架 1.1.2 适用于微服务搭建,搭建的微服务与Spring clound进行完美融合,都属于Spring家族,Spring boot+Spring clound属于品牌机,dubbo+zookeeper属于组装机,品牌机稳定性更好 1.2 使用Spring boot+Mybatis构建Restful…
SpringSecurity 可以使用注解对方法进行细颗粒权限控制,但是很不灵活,必须在编码期间,就已经写死权限 其实关于SpringSecurity,大部分类都不需要重写,需要的只是妥善的配置. 每次修改权限以后,需要让MetaDataSource刷新 资源-权限 的MAP,这里应该需要做一些处理,或者优化. 这里实现,可以在后台随时开启关闭权限,不需要硬编码写死.而且资源的RequestMapping,可以是有多个地址 可以根据角色分配权限,也可以精确到为每一个用户分配权限,模块,或者方法.…
目录结构 第一步:web.xml 先配置contextConfigLocation 对应的application-context.xml文件 打开webapp\WEB-INF\web.xml, 配置spring监听器和上下文 <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" x…
<!-- 加载配置文件 --> <context:property-placeholder location="classpath:db.properties" /> <!-- 数据源,使用dbcp --> <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close&quo…
在springboot中利用mybatis框架进行开发需要集成mybatis才能进行开发,那么如何在springboot中集成mybatis呢?按照以下几个步骤就可以实现springboot集成mybatis. 1.pom文件中配置jar包依赖也就是mybatis的起步依赖以及mysql驱动 <!--springboot 集成mybatis--><!--springboot中mybatis的起步依赖--><dependency> <groupId>org.m…
SpringBoot+Shiro+mybatis整合 1. 使用Springboot版本2.0.4 与shiro的版本 引入springboot和shiro依赖 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSch…