728x90 반응형 Back Side/Framework > Spring2 [어노테이션] @RequiredArgsConstructor 의존성 주입 Lombok를 이용해서 코드를 줄일 수 있다. Update를 하기 위해 Service 클래스에 @Service public class CourseService { private final CourseRepository courseRepository; public CourseService(CourseRepository courseRepository) { this.courseRepository = courseRepository; } @Transactional public Long update(Long id, Course course) { Course course1 = courseRepository.findById(id).orElseThrow( () -> new IllegalArgumentException(".. 2021. 11. 21. 스프링 포트에러 해결 - "Web server failed to start. Port 8080 was already in use" 스프링 프로젝트 생성 후 실행해보니 "Web server failed to start. Port 8080 was already in use.라는 문구와 함께 실행이 되지 않았다 ❗️ 이전에도 같은 경험을 해서 https://7942yongdae.tistory.com/35 Error - Port 8080 was already in use Port 8080 was already in use 에러와 원인과 해결 방법 메시지 *************************** APPLICATION FAILED TO START *************************** Description: Web server failed to start. Port 8080 was.. 7942yongdae.tistory.c.. 2021. 11. 18. 이전 1 다음 728x90 반응형