![](https://img-blog.csdnimg.cn/202012261742389.jpg?x-oss-process=image/resize,m_fixed,h_224,w_224)
Spring Boot
文章平均质量分 88
Spring Boot相关学习
君战
凡是过往,皆是序章
展开
-
小知识-Spring Boot是如何确定当前运行环境
Talk is cheap. Show me the codestatic WebApplicationType deduceFromClasspath() { if (ClassUtils.isPresent(WEBFLUX_INDICATOR_CLASS, null) && !ClassUtils.isPresent(WEBMVC_INDICATOR_CLASS, null) && !ClassUtils.isPresent(JERSEY_INDICATOR_C原创 2021-03-01 11:36:14 · 2401 阅读 · 0 评论 -
SpringApplication.run方法分析
通常我们启动一个SpringBoot应用,原创 2021-01-12 09:39:30 · 1664 阅读 · 0 评论 -
Spring Boot不指定包路径就可以扫描启动类所在包及其子包下的类是怎么做到的?
Talk is cheap. Show me the code第一步:在com.xxx.hyl.boot包下创建一个子包-beans,并在该包中创建一个Bean。package com.xxx.hyl.boot.beans;import org.springframework.context.annotation.ComponentScan;import org.springframework.stereotype.Component;/*** * 使用{@link ComponentScan原创 2020-12-29 17:41:41 · 2544 阅读 · 1 评论 -
SpringBoot工程中,如果不继承spring-boot-starter-parent ,还可以怎么做到的版本管理?
有些场景下,我们就是不能直接继承spring-boot-starter-parent,那么该如何做到版本管理呢?关于这一点,SpringBoot官方给出了解决版本,就是使用标签来解决。除此之外,还需要将打包插件设置为repackage。<dependencyManagement> <dependencies> <dependency> <groupId>org.springframework.boot<原创 2020-12-26 10:17:40 · 1281 阅读 · 1 评论