问题
在运行Springboot项目的时候出现No active profile set, falling back to 1 default profile: “default”

原因
没有配置启动依赖
解决1
配置如下依赖:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
解决2
如果依赖配置了,打开Edit Configurations

修改Environment vatiables为:
spring.profiles.active=application

解决Springboot无活跃配置Profile问题
在运行Springboot项目时遇到'Noactiveprofileset'错误,意味着未设置启动依赖。解决方案包括添加spring-boot-starter-web依赖或者在EditConfigurations中设置Environmentvariables为'spring.profiles.active=application'。确保正确配置以避免默认profile启动。
5万+

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



