![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
spring boot
小宇宙121
这个作者很懒,什么都没留下…
展开
-
springboot学习记录
使用IDEA创建springboot项目时,报错 ** WARNING ** : Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package. 2019-07-19 18:08:20.113 WARN 7284 --- [ main] ConfigSe...原创 2019-07-19 18:13:24 · 89 阅读 · 0 评论 -
spring-boot-start-parent
pom.xml里这段代码代表你的项目是一个springboot项目,这是Spring Boot的父级依赖。 spring-boot-starter-parent 是一个特殊的starter,它用来提供相关的Maven默认依赖。使用它之后,常用的包依赖可以省去version标签。 <!-- 指定Spring Boot的版本 2.0.4.RELEASE --> <paren...原创 2019-07-31 15:07:15 · 300 阅读 · 0 评论 -
springboot启动类位置
controller如下 @RestController public class HelloWorldController { @RequestMapping("/hello") public String hello(String name){ return name; } } 使用springbootTest测试代码如下: @SpringBoot...原创 2019-07-26 16:07:11 · 403 阅读 · 0 评论 -
springboot定时任务
使用SpringBoot创建定时任务非常简单,目前主要有以下三种创建方式: 1. 基于注解(@Scheduled) 2. 基于接口(SchedulingConfigurer) 前者相信大家都很熟悉,但是实际使用中我们往往想从数据库中读取指定时间来动态执行定时任务,这时候基于接口的定时任务就派上用场了。 3. 基于注解设定多线程定时任务 原文链接:https://www.cnblogs.com/...转载 2019-09-19 17:20:33 · 341 阅读 · 0 评论