
SpringBoot
大道至简@EveryDay
生活不止眼前的苟且,还有诗和远方的田野
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
SpringBoot项目启动问题
Field paymentService in com.yueyang.pay.controller.PaymentController required a bean of type ‘com.pay.dao.IPaymenDAO’ that could not be found. The injection point has the following annotations: - @org...原创 2020-04-11 15:25:23 · 647 阅读 · 0 评论 -
SpringBoot使用过滤器
1,若使用的是 Servlet3.0+版本,可以直接使用 Filter 的注解对 Filter 进行注册。其总步骤有 两步: 在定义好的 Filter 上使用@WebFilter 注解 在入口类上添加@ServletComponentScan 注解 2,使用 Servlet3.0 1)创建filter 2),修改入口类 servlet2.5 若使用的是 Servlet2.5 版本,没有...原创 2020-04-05 19:54:45 · 153 阅读 · 0 评论 -
Spring Boot 的事务支持
1,Spring Boot 对于事务的支持,只需完成两个步骤: 在启动类上添加@EnableTransactionManagement 注解,开启事务 在 Service 实现类的方法上添加@Transactional 注解 2,举例 将Service实现类中的@Transactional注解注释掉,再运行,页面与代码仍均会显示报错, 但查看 DB 表,会发现插入了一条记录,即异常前的插入...原创 2020-04-05 11:34:25 · 123 阅读 · 0 评论 -
idea实现热部署
1, org.springframework.boot spring-boot-devtools 2,防止idea钝化 3,热部署的优缺点 对于热部署的使用是有利有弊。利是无需手工重启工程,但弊端也很明显:在修 改过代码或配置后,只要保存系统就会重启工程,即使这个修改还未完毕,其也会重启,从 而导致代码重启后报错 ...原创 2020-04-05 11:00:52 · 720 阅读 · 0 评论 -
SpringBoot引入JSP
1, 添加 jasper 依赖 <dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-jasper</artifactId> </dependency>...原创 2020-04-05 11:30:33 · 242 阅读 · 0 评论