I have a test class that has a @Resource annotation for a setter and I need to make it Java 1.4 compliant, so obviously the annotation has to go. I’m using Spring.
So, how would I replace something like @Resource(“my.resource”) so that the setter gets the correct dependency injection? Would I need to make a bean in an xml file?
I’m pretty new to this so if I’m not providing enough information, let me know.
If you are in a Java 1.4 environment you cannot rely on Annotations as you already mentioned correctly. So you have to declare dependencies and bean definitions inside your XML-document that configures your Spring ApplicationContext.