有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java无法为@PropertySource注释定义正确的路径

我想在我的Spring项目中使用@PropertySource注释。我不知道我的ceny.properties文件的路径是什么。我有以下的路径

@PropertySource("classpath:properties\\ceny.properties")

和字典结构

C:\Users\X\IdeaProjects\XDxD\src\main\properties\ceny.properties

我正在使用IntelliJ。我应该把ceny.properties文件放在哪里。我假设类路径在main中


共 (0) 个答案