问题: springboot启动失败( No active profile set, falling back to default profiles: default) 解决方法 在pom.xml文件中增加以下依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </depen…
一.网上很多采用@Profile("dev")的方式获取,但是这个是类级别的 二.开发中可能需要代码级别 1.刚开始我想通过classpath下的文件读取方式,麻烦死了,于是换了个思路. 2.SpringBoot启动日志中有下面这句: 15:57:56.128 [restartedMain] INFO c.d.o.OptplatformApplication - The following profiles are active: test (1)跟踪代码:SpringApplicat…
项目代码如下: package hello; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication // same as @Configuration @EnableAutoConfiguration @ComponentScan public class Appli…
问题 如下: 2017-07-16 08:50:57.436 INFO 13524 --- [ main] c.p.p.web.PointshopWebApplication : Starting PointshopWebApplication on MSI with PID 13524 (D:\javaProject\com.ppdai.pointshop\pointshop-web\target\classes started by yangliweng…