java - How to make spring inject value into a static field - Stack Overflow
I've had a similar requirement: I needed to inject a Spring-managed repository bean into my Person entity class ("entity" as in "something with an identity", for example an JPA entity). A Person instance has friends, and for this Person instance to return its friends, it shall delegate to its repository and query for friends there.
Read full article from java - How to make spring inject value into a static field - Stack Overflow
No comments:
Post a Comment