Consider the following application context property placeholder definition that loads property files located on a classpath path location.
<context:property-placeholder location="classpath*:META-INF/spring/*.properties"/>
An annotated attribute is injected with values by annotating the attribute(s) that are configurable by Spring. Notice, that property values utilize EL (entity language) notation to render a value from the property placeholder name .
@Configurable
public class Foo {
@Value("${some.property}")
String propertyAttribute;
..... rest of the class definition.....
}
Entries in a property text file would look like this. some.property = Some Value for a property
The first several months of my site there were no comments; just give it time; now they come in like crazy every day! Thanks. remote access
ReplyDelete