The presence of this annotation on a class automatically registers the class with the runtime as a managed bean class. Classes must be scanned for the presence of this annotation at application startup, before any requests have been serviced.
The ManagedBean annotation marks a POJO (Plain Old Java Object) as a ManagedBean.A ManagedBean supports a small set of basic services such as resource injection, lifecycle callbacks and interceptors.
@value
Spring 通过注解获取*.porperties文件的内容,除了xml配置外,还可以通过@value方式来获取。
import javax.annotation.ManagedBean;
From this link:
The ManagedBean annotation marks a POJO (Plain Old Java Object) as a ManagedBean.A ManagedBean supports a small set of basic services such as resource injection, lifecycle callbacks and interceptors.
@value
Spring 通过注解获取*.porperties文件的内容,除了xml配置外,还可以通过@value方式来获取。
使用方式必须在当前类使用@Component,xml文件内配置的是通过pakage扫描方式例如:
how Jerry researches on the usage of @value
Perform keyword search:
It means in the runtime, the Java variable configurationServerUri will automatically have value "https://api.yaas.io/hybris/configuration/v1" filled by Spring framework.