250423 수 SPRING

안준성·2025년 4월 23일

Spring 자주쓰는 어노테이션 정리
Serviceimpl
@Service
@Transactional(rollbackFor=Exception.class)

Controller
@Controller
@RequestMapping("")

@GetMapping
@PostMapping

@SessionAttributes ---> Model model 도 참고 - Session Scope에 있는 지정된 객체를
함수명 (@SessionAttribute(이름 헷갈림 주의!) 매개변수type 매개변수명)
Controller - 비동기식 요청
@ResponseBody
함수명(RequestBody 매개변수type 매개변수명){}

기타
@autowired
@RequiredArgsConstructor - final

0개의 댓글