
springboot
放肆的青春゛つ
做最好的自己---在校生一枚,写博客作为复习巩固,有错还请指教
展开
-
springboot拦截器
springboot的拦截器的注册还是比较方便的主要还是分为两部分:1、实现HandlerInterceptor接口创建拦截器2、实现WebMvcConfigurer接口配置拦截器一下使用一个简单的例子还是说明其用法,就拿登录后才可以访问某一些页面来讲1、创建拦截器,实现HandlerInterceptor接口public class UserInterceptor implements HandlerInterceptor { @Override public boo原创 2020-11-28 20:14:19 · 298 阅读 · 0 评论 -
Springboot集成jsp
spingboot前端使用jsp一般在springboot都是使用thymeleaf,但是使用jsp也是可以的,需要引入依赖集成。创建一个文件用来存放jsp文件的的文件夹webapp在pom.xml文件依赖<dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactI.原创 2020-11-24 16:54:15 · 257 阅读 · 1 评论 -
Invalid bound statement (not found): com.ycy.system.mapper.UserMapper.selectByPrimaryKey
【已解决】Invalid bound statement (not found): com.ycy.system.mapper.UserMapper.selectByPrimaryKey在pom.xml文件中加上:<!--手动指定资源文件夹--> <resources> <resource> <directory>src/main/java</directory> <includ原创 2020-11-06 20:31:42 · 366 阅读 · 0 评论 -
Error creating bean with name ‘teacherController‘: Unsatisfied dependency expressed through field ‘
Springboot集成mybatis,mybatis逆向工程时多执行了一次,导致xxx.xml文件中出现了多个相同的映射错误如下:org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'com/ycy/demo/mapper/TeacherMapper.xml'. Cause: java.lang.IllegalArgumentException: Result Map.原创 2020-11-04 22:02:29 · 2197 阅读 · 0 评论 -
Springboot 实现 myBatis逆向工程
1、引入依赖<!--mybatis与spring的连接--><dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>2.1.0</version> </dependency>原创 2020-11-03 22:25:08 · 260 阅读 · 0 评论 -
@ConfigurationProperties 在Idea中冒红问题
虽然冒红但是不影响运行pom.xml文件:<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-configuration-processor</artifactId> <version>2.1.9.RELEASE</version> <optional>t原创 2020-10-24 20:59:11 · 1258 阅读 · 0 评论