外部配置SpringBoot项目的SpringApplication。
MSCode微服务平台框架 mscodecloud.com 代码示例
spring.main.web-application-type=none
spring.main.banner-mode=off
new SpringApplicationBuilder()
.bannerMode(Banner.Mode.OFF)
.sources(demo.MyApp.class)
.run(args);
spring.main.sources=com.acme.Config,com.acme.ExtraConfig
spring.main.banner-mode=console
MSCode微服务平台框架 mscodecloud.com 基于Spring Cloud、Spring Boot和Activiti7工作流,提供所有源码和详尽文档,帮助企业快速开发分布式业务系统。
本文介绍如何使用外部配置启动SpringBoot项目,通过设置spring.main.web-application-type为none和spring.main.banner-mode为off来关闭默认应用类型和启动横幅。演示了使用newSpringApplicationBuilder进行自定义配置,包括设置启动类、运行参数等,以及如何指定多个配置类。
2万+

被折叠的 条评论
为什么被折叠?



