공부/Spring (45) 썸네일형 리스트형 스프링 부트 3 백엔드 개발자 되기_10 Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback. Fri Aug 11 08:38:50 KST 2023 There was an unexpected error (type=Internal Server Error, status=500). An error happened during template parsing (template: "class path resource [templates/articleList.html]") org.thymeleaf.exceptions.TemplateInputException: An error happened during templ.. 스프링 부트 3 백엔드 개발자 되기_9 스프링부트 실행하고 웹브라우저 접속했는데 There was an unexpected error (type=Internal Server Error, status=500). An error happened during template parsing (template: "class path resource [templates/example.html]") org.thymeleaf.exceptions.TemplateInputException: An error happened during template parsing (template: "class path resource [templates/example.html]") at org.thymeleaf.templateparser.markup.AbstractMarku.. 스프링 부트 3 백엔드 개발자 되기_8 mport org.springframework.ui.Model; 모델 객체는 뷰, 즉 HTML로 값을 넘겨주는 객체임 따로 생성할 필요없이 인자로 선언하기만 하면 스프링이 알아서 만들어줌 스프링 부트 3 백엔드 개발자 되기_7 3.http://localhost:8080/h2-console Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback. Fri Aug 04 08:28:54 KST 2023 There was an unexpected error (type=Not Found, status=404). =>확인완료 application.yml 설정 spring: jpa: #전송 쿼리 확인 show-sql: true properties: hibernate: format_sql: true defer-datasource-initialization: true datasource: url: jd.. 스프링 부트 3 백엔드 개발자 되기_6 어제 문제 Entity has no identifier => 아래 글로 해결함 https://sudo-minz.tistory.com/122 No identifier specified for entity 문제 해결 방법 No identifier specified for entity 문제 해결 방법 다음과 같은 오류가 발생하면.. nested exception is org.hibernate.AnnotationException: No identifier specified for entity: com.minji.site.domain.Member 해당 클래스의 @Id 어노테이 sudo-minz.tistory.com @Id 어노테이션이 무엇을 import 하고 있는가? 만약 import org.springframe.. 스프링 부트 3 백엔드 개발자 되기_5 6장 REST API의 장점 주소와 메서드만 보고 요청의 내용을 알 수 있음 @Builder는 롬복에서 지원하는 건데 이걸 생성자 위에 입력하면 빌더 패턴 방식으로 객체를 생성할 수 있어 편리함 객체를 유연하고 직관적으로 생성할 수 있는 장점이 있음 @NoArgsConstructor 기본 생성자 추가 @AllArgsConstructor 모든 필드 값을 파라미터로 받는 생성자 추가 140pg까지함 ## 안됨? at me.shinsunyoung.springbootdeveloper.SpringBootDeveloperApplication.main(SpringBootDeveloperApplication.java:9) ~[classes/:na] Caused by: org.hibernate.AnnotationExce.. 스프링 부트 3 백엔드 개발자 되기_4 04장 JUnit의 애너테이션 @BeforeAll(전체 테스트 시작 전 처음 한번만 실행, 전체 테스트 실행 주기에서 한번만 호출돼야 해서 메서드를 static ) @BeforeEach(테스트케이스 실행전 매번 실행, 각 인스턴스에 대해 메서드를 호출해야 돼서 메서드는static이 아니어야함 ) @Test(테스트 실행) @AfterEach(테스트 종료전 매번 실행) @AfterAll(각 테스트를 마치고 종료 전 한번만 실행, 테스트 실행 주기에서 한번만 호출돼서 static) AssertJ 검증문의 가독성 높여주는 라이브러리 5장.데이터베이스 조작이 편해지는 ORM 데이터베스를 관리하기 위한 소프트웨어를 DBMS라고 함 흔히 데이터베이스라고 알고 있는 오라클 등은 사실 DBMS ORM이란 자바의 객체와 .. 스프링 부트 3 백엔드 개발자 되기_3 @DisplayName("getAllMembers: 아티클 조회에 성공한다") @Test public void getAllMembers() throws Exception { //given final String url = "/test"; Member savedMember = memberRepository.save(new Member(1L, "홍길동")); //when final ResultActions result = mockMvc.perform(get(url)// .accept(MediaType.APPLICATION_JSON)); //then result .andExpect(status().isOk())// //응답의 0번째 값이 DB에서 저장한 값과 같은지 확인 .andExpect(jsonPath(".. 이전 1 2 3 4 5 6 다음 목록 더보기