Required « Annotation « Spring Q&A





1. Recommended usage of Spring's @Required annotation    stackoverflow.com

I see that Spring has a @Required annotation to mark member variables in beans that must be set. Is there a best practice for using this? For instance, might ...

2. Spring @Required annotation not working as expected    stackoverflow.com

I'm trying to test out Spring Annotations to see how they work with some simple examples derived from the Spring 3.0 Source (in this case the "@Required" annotation specifically). To ...

3. Question on Spring 3 autoscan and required annotation    stackoverflow.com

I have a class annotated with spring Component e.g:

@Component
public class ImportantClass{

@Autowired
private DependentClassIF otherClass;

//getters setters

@Required 
public void setOtherClass(DependentClassIF c){
this.otherClass = c;    
}

public interface DependentClassIF {
   ...

4. @Required annotation not working?    forum.springsource.org

@Required annotation not working? Hello all, I noticed that if I create a class that extends PropertyPlaceholderConfigurer, none of its properties can be @Required or be filled in with @Value's. In ...

5. @Required annotation and autowiring    forum.springsource.org

Maybe I misunderstood something about the @Required annotation but it doesn't seem to work with autowiring (byName in my case). When I specify each property of the bean it works. Does ...

6. Question about new @required annotation    forum.springsource.org

Hi, I like new @required annotation introduced in Spring 2.0, because it generates a more user-friendly error at runtime. But I need to know if this annotation adds a runtime overhead ...

7. Required annotation check    forum.springsource.org

Is there any way to get Spring IDE to display a warning or error if a required dependency (w/ the @Required annotation) is not set? Right now I can only see ...

8. Autowired, Required, with source-annotated default?    forum.springsource.org

Autowired, Required, with source-annotated default? After searching, I don't think there's a way to do this in 2.5.x, but maybe I've missed something. If not, consider this an enhancement request. I'd ...