標準のMavenフォルダー構造があります:
src/main/java
src/main/resources
src/test/java
src/test/resources
私のappicationContextには次のものが含まれています。
<!-- load properties files -->
<context:property-placeholder location="classpath*:*.properties"/>
hibernate.properties2つのファイルを定義しました。1つは用src/main/resources、もう1つは用src/ test/resourcesです。テストを実行すると、テストhibernate.propertiesが本番環境を上書きすることを期待していましたhibernate.properties。その代わりに、両方のファイルがロードされ、製品版が使用されます。
Loading properties file from file [D:\projects\video_crawler_v3\out\test\core\hibernate.properties]
Loading properties file from file [D:\projects\video_crawler_v3\out\production\core\hibernate.properties]
プロパティファイルを正しく設定するにはどうすればよいですか?IntellijIDEAを使用してテストをコンパイルおよび実行しています