note.wcoder.com
wcoder GitHub

Table of Contents

为什么SpringBoot可以直接运行 Jar 包?

7min到40s:SpringBoot启动优化实践

SpringBoot优雅停机

Spring容器获取Bean的9种方式,你能get几种?

事务 @Transactional
SpringBoot 多数据源及事务解决方案

SpringBoot教程(7) @ConditionalOnProperty 详细讲解和示例
通过自定义starter,优雅实现接口统一返回和统一异常处理

使用ImportSelector接口动态加载Bean

profile

application.properties

spring.profiles.active=@profiles.active@

项目级别pom.xml

<profiles>
		<profile>
			<id>dev</id>
			<properties>
				<profiles.active>dev</profiles.active>
			</properties>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
		</profile>
		<profile>
			<id>uat</id>
			<properties>
				<profiles.active>uat</profiles.active>
			</properties>
		</profile>
	</profiles>

全局设置源码下载
settings.xml

<profiles>
<profile>
        <id>downloadSources</id>
        <properties>
            <downloadSources>true</downloadSources>
            <downloadJavadocs>true</downloadJavadocs>
        </properties>
    </profile>
</profiles>
<activeProfiles>
      <activeProfile>downloadSources</activeProfile>
  </activeProfiles>
← Previous Next →
Less
More