Top "Annotations" questions

In programming, annotations are used to add information to a code element which cannot be expressed by the type system.

What's the difference between @Component, @Repository & @Service annotations in Spring?

Can @Component, @Repository and @Service annotations be used interchangeably in Spring or do they provide any particular functionality besides acting …

java spring spring-mvc annotations
When do you use Java's @Override annotation and why?

What are the best practices for using Java's @Override annotation and why? It seems like it would be overkill to …

java annotations
@Autowired - No qualifying bean of type found for dependency

I've started my project by creating entities, services and JUnit tests for services using Spring and Hibernate. All of this …

java spring spring-mvc annotations autowired
JsonMappingException: No suitable constructor found for type [simple type, class ]: can not instantiate from JSON object

I am getting the following error when trying to get a JSON request and process it: org.codehaus.jackson.map.…

java json spring annotations jackson
Setting default values for columns in JPA

Is it possible to set a default value for columns in JPA, and if, how is it done using annotations?

java jpa annotations
Difference between <context:annotation-config> and <context:component-scan>

I'm learning Spring 3 and I don't seem to grasp the functionality behind <context:annotation-config> and <context:component-scan&…

java spring configuration annotations spring-3
Why does JPA have a @Transient annotation?

Java has the transientkeyword. Why does JPA have @Transient instead of simply using the already existing java keyword?

java jpa jakarta-ee annotations transient
Only using @JsonIgnore during serialization, but not deserialization

I have a user object that is sent to and from the server. When I send out the user object, …

java json spring annotations jackson
@RequestBody and @ResponseBody annotations in Spring

Can someone explain the @RequestBody and @ResponseBody annotations in Spring 3? What are they for? Any examples would be great.

java spring spring-mvc annotations
Neither BindingResult nor plain target object for bean name available as request attribute

I'm just learning the ropes of Spring 3's annotation fu and I've stumbled upon the newb's nightmare exception. Would appreciate …

spring-mvc annotations