What's the Spring way of accessing properties from an entity?
问题 I'm new to Spring and I'm building an application where some entities (JPA/Hibernate) need access to a property from application.properties. I do have a configuration class in which this is trivial: @Configuration public class FactoryBeanAppConfig { @Value("${aws.accessKeyId}") private String awsAccessKeyId; @Value("${aws.secretKey}") private String awsSecretKey; } but since entities do not have and I think they should not have the annotations such as @Configuration or @Component , what's the