소속패키지 |
애노테이션명 |
설명
|
|
@Deprecated |
|
|
@Mapping |
|
com.fasterxml.jackson.annotation |
@JsonIgnore |
JSON형식 출력시에는 제외시킴
|
java.lang |
@Override |
|
@SuppressWarnings |
|
java.lang.annotation
|
@Documented |
|
@Retention |
|
@Target |
|
javax.persistence
|
@Column |
컬럼 관련 설정(이름, 제약조건 등)
|
@Entity |
JPA엔티티 선언
|
@GeneratedValue |
자동으로 값 부여[1]
|
@Id |
엔티티 기본키 필드
|
@JoinColumn |
조인 컬럼 설정
|
@JoinTable |
조인 테이블 설정
|
@ManyToOne |
다대일 관계 설정
|
@ManyToMany |
다대다 관계 설정
|
@Table |
테이블 관련 설정(이름 등)
|
javax.validation.constraints
|
@Max |
최대값 제약
|
@Min |
최소값 제약
|
@NotNull |
널 허용 안함
|
@Size |
최소/최대 길이 제약
|
org.hibernate.annotations |
@GenericGenerator |
|
org.springframework.beans.factory.annotation
|
@Autowired |
|
@Qualifier |
|
org.springframework.boot |
@SpringBootApplication |
스프링부트 앱
|
org.springframework.boot.autoconfigure |
@EnableAutoConfiguration ★ |
|
org.springframework.cloud.config.java |
@ServiceScan |
|
org.springframework.context.annotation |
@Bean |
|
@ComponentScan |
|
@Configuration |
|
org.springframework.core.annotation |
@Order |
|
org.springframework.stereotype
|
@Component |
|
@Controller ★★ |
|
@Service |
|
@Repository ★ |
|
org.springframework.transaction.annotation |
@Transactional |
|
org.springframework.validation.annotation |
@Validated |
|
org.springframework.web.bind.annotation
|
@ModelAttribute |
|
@RequestMapping ★★ |
|
@ResponseBody |
|
@RestController ★★ |
|
org.springframework.web.servlet.config.annotation |
@EnableWebMvc ★★ |
|
lombok
|
@AllArgsConstructor |
모든 인자를 받는 생성자
|
@Data |
|
@NoArgsConstructor |
인자 없는 생성자[2]
|
@ToString |
.toString() 메소드[3]
|