首页 > 编程语言 > 详细

《Spring Boot实战》示例代码问题

时间:2018-08-20 01:04:08      阅读:221      评论:0      收藏:0      [点我收藏+]

* Idea环境

* 《Java EE开发的颠覆者 Spring Boot实战》

1、2.2 Spring EL

读取文件获取不到:

需把test.txt和test.properties放在resource文件下,将resource文件标记为资源目录,将引用目录换为"classpath:test.txt"就可以。

2、 2.4  Profile

运行报错:GenericApplicationContext does not support multiple refresh attempts. 不允许多次刷新context。

需要在idea里修改Environment variable,设置spring.profiles.active=prod或dev启动,注掉修改context相关的三行代码即可。

技术分享图片

技术分享图片

 

《Spring Boot实战》示例代码问题

原文:https://www.cnblogs.com/cachedking/p/9503405.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!