I am using Spring Boot and Lombock, and I have a bean that is initialized with some String properties, and provides them to other classes:
@Getter
@Configuration
@PropertySource(value = "classpath:texts.properties")
public class TextProvider {
@Value("${some.text.value}")
private String text1;
@Value("${other.text.value}")
private String text2;
}
When Lombok creates the getters for this class, it copies the @Value annotation to the get methods, causing Spring's AutowiredAnnotationBeanPostProcessor to print the following info on system startup: "Autowired annotation should only be used on methods with parameters: " + method.
Is there a way to not copy these annotations to the getter?