Could some one provide a good snippet to construct and inject Google guava’s CacheBuilder into a dependent bean via Spring xml?
To generalize, I need some examples in Spring that illustrates construction of objects using builder pattern.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
While it’s possible to call arbitrary methods in Spring XML using the
factory-methodattribute, you’ll find that it’s close to impossible for Builder-Pattern style chained calls.Instead, use a
FactoryBeanor Java-based container configuration for such complex scenarios. XML will not get you that far, I’m afraid.