I need to get a specific EhCache instance by name and I\'d prefer to autowire if possible. Given the following automatically configured controller, how can I autowire in the
You can also use autowire if the context can find a bean with the correct class. Here is how I configured my xml
WEB-INF/ehcache.xml
And my java class
@Autowired private net.sf.ehcache.Cache cache;
This setup works for me.