Код: Выделить всё
Caused by: java.io.FileNotFoundException: class path resource
[application-lib.properties] cannot be opened because it does not
exist at
org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:211)
~[spring-core-6.0.8.jar:6.0.8] at
org.springframework.core.io.support.EncodedResource.getInputStream(EncodedResource.java:160)
~[spring-core-6.0.8.jar:6.0.8] at
org.springframework.core.io.support.PropertiesLoaderUtils.fillProperties(PropertiesLoaderUtils.java:100)
~[spring-core-6.0.8.jar:6.0.8] at
org.springframework.core.io.support.PropertiesLoaderUtils.fillProperties(PropertiesLoaderUtils.java:74)
~[spring-core-6.0.8.jar:6.0.8] at
org.springframework.core.io.support.PropertiesLoaderUtils.loadProperties(PropertiesLoaderUtils.java:60)
~[spring-core-6.0.8.jar:6.0.8] at
org.springframework.core.io.support.ResourcePropertySource.(ResourcePropertySource.java:67)
~[spring-core-6.0.8.jar:6.0.8] at
org.springframework.core.io.support.DefaultPropertySourceFactory.createPropertySource(DefaultPropertySourceFactory.java:37)
~[spring-core-6.0.8.jar:6.0.8] at
org.springframework.core.io.support.PropertySourceProcessor.processPropertySource(PropertySourceProcessor.java:87)
~[spring-core-6.0.8.jar:6.0.8]
Код: Выделить всё
@Configuration
@PropertySource("classpath:application-lib.properties")
@EnableEncryptableProperties
public class AppConfig {
Spring Boot: 3.0.6
Java: 17
STS: 4.x
Подробнее здесь: https://stackoverflow.com/questions/775 ... h-resource