spring - How To Replace @Resource Annotation with Java 1.4 Compliant Version -


I have a test class that has a @ resort annotation for a setter and I need to make it Java 1.4 compliant So, obviously annotation should go, I'm using Spring.

So, how do I change something like @resource ("my.resource") so that the setter gets the right dependency injection? Do I need to create bean in an XML file?

I am very new to this so that if I do not provide enough information, then tell me if you are in the environment of Java 1.4 then you can not trust annotations because you already mention it correctly. Have been. You will have to declare the definitions of dependencies and bean within your XML document, which configures your spring conversion.

  & lt; Bean id = "myBeanName" class = "my.package.myClass" & gt; & Lt ;! - Bean in the injection property in other - & gt; & Lt; Property name = "property name" ref = "other bean" /> & Lt ;! - Inject property - Prices in other properties - & gt; & Lt; Property name = "other property" value = "property value" /> & Lt ;! - An example of an anonymous bean in the inner bean - & gt; & Lt; Property Name = "Innerbine" & gt; & Lt; Bean class = "my.package.InnerBean" /> & Lt; / Property & gt; & Lt; / Bean & gt; & Lt; Bean id = "Other bean" category = "my package.OtherBean" />  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -