Hopefully someone has come across this before. I'm running Spring STS 2.3.0 and when attempting to use the @Resource annotation from javax.annotations.Resource I get "Access restriction: The type Resource is not accessible due to restriction on required library". I'm using the JDK 6u18.
I've tried changing the JDK Compliance to 1.5 and 1.6 and both yield the same error.
Cheers, -Ed
This worked for me: Change eclipse (STS) project build path | Libraries tab | select JRE System Library [J2SE-1.4] | Edit button | change from Execution Environment radio tab which says J2SE 1.4 (jdk1.6.0_21) to Workspace default JRE (jdk1.6.0_21).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With