Top "Annotations" questions

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

intellij incorrectly saying no beans of type found for autowired repository

I have created a simple unit test but IntelliJ is incorrectly highlighting it red. marking it as an error No …

java spring intellij-idea annotations autowired
org.hibernate.MappingException: Could not determine type for: java.util.Set

Although this question asked many times and I have already used all the suggestion but still I am getting this …

java hibernate jpa annotations
Setting a JPA timestamp column to be generated by the database?

In my SQL Server 2000 database, I have a timestamp (in function not in data type) column of type DATETIME named …

java jpa persistence annotations timestamp
How to supply value to an annotation from a Constant java

I am thinking this may not be possible in Java because annotation and its parameters are resolved at compile time. …

java arrays annotations
Scanning Java annotations at runtime

What is the best way of searching the whole classpath for an annotated class? I'm doing a library and I …

java annotations classloader
Should we @Override an interface's method implementation?

Should a method that implements an interface method be annotated with @Override? The javadoc of the Override annotation says: Indicates …

java oop interface annotations
How to scan multiple paths using the @ComponentScan annotation?

I'm using Spring 3.1 and bootstrapping an application using the @Configuration and @ComponentScan attributes. The actual start is done with new …

java spring annotations
How to use @Nullable and @Nonnull annotations more effectively?

I can see that @Nullable and @Nonnull annotations could be helpful in preventing NullPointerExceptions but they do not propagate very …

java annotations nullpointerexception nullable code-standards
@Transactional(propagation=Propagation.REQUIRED)

if some one can explain what this annotation do and when exactly we use it : @Transactional(propagation=Propagation.REQUIRED) Thanks

java spring annotations
Do I need <class> elements in persistence.xml?

I have very simple persistance.xml file: <?xml version="1.0" encoding="UTF-8"?> <persistence version="1.0" xmlns="http://java.sun.…

java hibernate orm jpa annotations