将资源文件添加到access-data-mongodb的问题

时间:2014-10-12 19:13:46

标签: java spring maven spring-boot spring-mongodb

我正在尝试使用这个Spring Boot MonogoDB示例,但我想更改monogoDB服务器的位置。

http://spring.io/guides/gs/accessing-data-mongodb/

我在Application.java中添加了以下行:

@PropertySource("classpath:/app-config.properties")

另外将app-config.properties添加到src/resources但我收到此错误:

Caused by: java.io.FileNotFoundException: class path resource [app-config.properties] cannot be opened because it does not exist

有人可以帮帮我......

0 个答案:

没有答案