Top "Annotations" questions

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

Generating Entity Getters and Setters in Symfony / Doctrine ORM

I have the following ORM Symfony entity with only properties : <?php namespace Evr\HomeBundle\Entity; use Doctrine\ORM\Mapping …

symfony annotations doctrine getter-setter
@WebServlet annotation with Tomcat 7

In my application, I had a servlet which was defined like this in the web.xml: <servlet> <…

servlets annotations tomcat7 servlet-3.0
JPA Criteria Tutorial

I've been trying to find a JPA Criteria API tutorial but haven't been much successful. Do you know about any …

java jpa annotations jpa-2.0
JUnit @Test expected annotation not working

I've got the following test: @Test(expected = IllegalStateException.class) public void testKey() { int key = 1; this.finder(key); } But JUnit reports, …

java exception junit annotations throwable
How to create optional parameters for own annotations?

Following is the annotation code public @interface ColumnName { String value(); String datatype(); } I would like to make datatype an optional …

java annotations
Xml configuration versus Annotation based configuration

In a few large projects i have been working on lately it seems to become increasingly important to choose one …

java xml spring annotations
Text Field using Hibernate Annotation

I am having trouble setting the type of a String, it goes like public void setTextDesc(String textDesc) { this.textDesc = …

hibernate annotations blob
Android Retrofit Parameterized @Headers

I am using OAuth and I need to put the OAuth token in my header every time I make a …

java android annotations retrofit
Multiple annotations of the same type on one element?

I'm attempting to slap two or more annotations of the same type on a single element, in this case, a …

java annotations
When annotating a class with @Component, does this mean it is a Spring Bean and Singleton?

Being fairly new to Spring I have a question about annotating a class. When annotating a class with @Component does …

spring annotations