서블릿이 지원하는 exception 방식Exceptionresponse.sendError(HTTP status code, error message)Exception자바 직접 실행에서 Exception (기본 메커니즘)자바 메인 메서드 실행시, main 이라는 이름의 스
화면 전환(새로고침) 없이 이루어지는 동작들은 대부분 비동기 통신. 비동기 통신을 위해 서버로 요청 메시지를 보낼 때 본문에 데이터를 담아 보내야한다. 이 본문이 body이다.@RequestBody, @ResponseBody HTTP Body ↔️ JAVA 객체 변
출처 : https://deeplify.dev/back-end/spring/oauth2-social-login
what? User Domain 생성 domain / User interface → user class repository / UserRepository interface → MemoryuserRepository save,findById
@repository → @component → 컴포넌트 스캔의 대상이 됨@Autowired→ 컨트롤러 생성자 주입, constructor가 1개만 있으면 생략 가능@RequiredArgsConstructor → @Autowired + Constructor 생략 가능@
Service에서 발생한 예외들을 Controller로 넘겨 각 다른 예외를 처리하도록 한다.→ write메소드에 throw BaseException 추가 후 throw→ catch에서 exception 잡아서 e.getStatus return 스프링 MVC는 Cont
HttpSession 객체가 생성되고 제거될 때 발생되는 이벤트인 HttpSessionEvent를 처리하는 리스너HttpSession에는 다음과 같이 현재 접속한 클라이언트에 대한 정보를 담을 수 있다.따라서 다음과 같이 UserController의 login 부분에서
Spring 프로젝트를 AWS 서버리스 플랫폼 Lambda에 적용하기
에러가 발생한다.org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.moing.backend.domain.mission.entity.Team.tea