Spring @Resource Handling
问题 I'm having trouble with a field annotated as @Resource in a Spring bean. What I have: A field, with setter method, annotated @Resource @Resource private URL someUrl; public void setSomeUrl(URL someUrl) { this.someUrl = someUrl; } An <env-entry> tag in my deployment descriptor (web.xml) <env-entry> <env-entry-name>someUrl</env-entry-name> <env-entry-type>java.net.URL</env-entry-type> <env-entry-value>http://somedomain.net/some/path</env-entry-value> </env-entry> The application fails to start