에러일기

· 에러일기
문제점 "psql" does not exist docker로 실행한 postgres db에 연결이 안 되는 문제가 발생! 소켓에서 서버에 연결합니다. 실패, 데이터베이스 "psql"이 존재하지 않습니다. 라는 에러가 발생 해결 https://yeojin-dev.github.io/blog/postgresql-ubuntu/ Ubuntu 환경에서 PostgreSQL 설치 후 리모트 접속하기 YEOJIN-DEV yeojin-dev.github.io psql --username=postgres --dbname=postgres 이렇게 입력해주면 현재 시스템 유저와 같은 이름으로 PostgreSQL을 사용할 수 있다고 한다.
· 에러일기
문제 발생 Execution failed for task ':test'. > Could not resolve all files for configuration ':testRuntimeClasspath'. > Could not find com.mysql:mysql-connector-j:. Required by: project : Gradle에 // mysql runtimeOnly 'com.mysql:mysql-connector-j' 이 코드 추가하고, 클린 빌드 수행 했을 때 저런 문제가 발생했습니다. 원인 https://nayha.tistory.com/740 인텔리제이 could not find mysql:mysql-connector-java gradle could not find mysql:mysql-..
· 에러일기
문제점 이렇게 채워넣고 Create를 한 후 Validation을 클릭했는데 자꾸 401 code를 리턴받았다. 원인 위의 그림의 설정 값에 domain과 path는 입력을 안 해주고 있었는데.! Postman에서는 자동으로 설정이 되어서, 사실 name과 value값만 넣어서 동작시키면 될 줄 알았다. ㅠ 해결 Postman에 설정되어 있는 Domain, Path 값들을 입력해주니 200코드를 반환 받을 수 있었다.!! 2024-02-17 23:05:13,495 INFO http://127.0.0.1:8084/api/v1/post -> 200 , 1759 bytes 제대로 쿠키 값이 입력 되었다면, 이렇게 beforeProcess() 안에 accessToken, refreshToken(그 외 등등 쿠키..
· 에러일기
문제점 java.lang.IllegalArgumentException: Unable to serialize claims object to json: Unable to serialize object: Java 8 date/time type `java.time.LocalDateTime` not supported by default 문제발생코드 @Entity @Getter @AllArgsConstructor @NoArgsConstructor @Builder public class Authority extends BaseEntity { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @JsonIgnore private Long id; private String..
· 에러일기
문제점org.h2.jdbc.JdbcSQLIntegrityConstraintViolationException 문제 발생 코드 @DeleteMapping("/{commentNumber}/deleteComment") public ApiResponse deleteComment(@PathVariable int commentNumber) { commentService.deleteComment(commentNumber); return ApiResponse.of(HttpStatus.NO_CONTENT, null); } 무결성 제약 조건 위배 발생했다는 에러가 떴다.댓글 엔티티에 boardNumber 즉 fk로 엮여 있다.댓글을 삭제하려고 하니 부모인 board 엔티티에서 자식인 comment가 없어지려고 하자. 에러가..
· 에러일기
Rest docs와 PathVariable 문제점 발견 문제점 java.lang.IllegalArgumentException: urlTemplate not found. If you are using MockMvc did you use RestDocumentationRequestBuilders to build the request? 문제가 발생한 코드 @DisplayName("상세 게시글 페이지에서 좋아요(△, ▽) 버튼을 누를 수 있다.") @WithAuthUser(email = "test123@naver.com", role = "ROLE_USER") @Test void putFavorite() throws Exception { final int boardNumber = 1; mockMvc.perform..
솜사탕코튼
'에러일기' 카테고리의 글 목록