Stop using @value annotation in spring boot.
5 min readMar 29, 2024
Configuration is an important topic of every application which has more than a couple of hundred lines of code. In case you are using Spring, you would typically use Spring’s @Value annotation to load values from a Java properties file.
Let’s have a look at the classic @Value annotation in Spring, it may look something like this:
@Service
public class EmployeeServiceImpl implements EmployeeService {
private static final Logger LOGGER = LoggerFactory.getLogger(EmployeeServiceImpl.class)…