启动APP后,报错No active profile set, falling back to default profiles: default
点击启动APP,报错No active profile set, falling back to default profiles: default;
APP类的代码如下:
/** * Hello world! * */ @SpringBootApplication(scanBasePackages = {"com.miaoshaproject"}) @RestController @MapperScan("com.miaoshaproject.dao") //@EnableAutoConfiguration public class App { @Autowired private UserDoMapper userDoMapper; @RequestMapping("/") public String home(){ UserDo userDo = userDoMapper.selectByPrimaryKey(1); if(userDo == null){ return "用户对象不存在"; }else { return userDo.getName(); } } public static void main( String[] args ) { System.out.println( "Hello World!" ); SpringApplication.run(App.class,args); } }