SpringBoot 2.0启动报No active profile set, falling back to default

创建一个SpringBoot项目之后,控制台打印如下:

    .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.1.1.RELEASE)

2019-01-09 21:10:41.812  INFO 11644 --- [main] com.example.demo01.Demo01Application: Starting Demo01Application on 20180528-132245 with PID 11644 (D:\SpringBoot\project\demo01\target\classes started by Administrator in D:\SpringBoot\project\demo01)

2019-01-09 21:10:41.821  INFO 11644 --- [main] com.example.demo01.Demo01Application: No active profile set, falling back to default profiles: default

2019-01-09 21:10:43.160  INFO 11644 --- [main] com.example.demo01.Demo01Application: Started Demo01Application in 1.955 seconds (JVM running for 3.395)

Process finished with exit code 0

原因:创建的pom.xml有问题,

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-tomcat</artifactId>
    <scope>provided</scope>
</dependency> 

pom文件中有这个依赖,这个是什么意思呢?

简单来说就是:我把外部的一个tomcat引入了。

这下你明白了吧,spring boot内部本来就有一个。你现在又引入了一个,这下出问

解决方案:上述代码删掉,重新Import changes就Ok了


 上一篇
hexo打包报TypeError Cannot read property 'count' of undefined hexo打包报TypeError Cannot read property 'count' of undefined
某一天,突然想将自己的博客文章发布打包项目时,报如下错误: $ hexo g INFO Start processing FATAL Something's wrong. Maybe you can find the solution he
2019-11-24
下一篇 
阿里云服务器无法访问配置的服务端口 阿里云服务器无法访问配置的服务端口
原因分析:阿里云为了安全考虑,需要设置安全规则,否则会导致无法访问到服务器的相关端口。 解决方法:在云服务器管理控制台按以下步骤简单设置一下即可 点击添加规则,设置端口 注意: 添加完安全规则后需要重启服务器才能生效。 然后windows
2019-11-16
  目录