fee-fi-fo-fum
JWT weekKey error
Error Logs🐾 2023. 12. 26. 17:00

JWT Secret Key의 보안이 약하다는 에러이다. 키의 길이를 늘려주니까 정상동작하였다. 시크릿키의 경우에는 최소 512bits 이상으로 설정하는 것을 권장한다. [참고 자료1] [참고 자료2]

도커 + Redis 연동 에러
Error Logs🐾 2023. 12. 26. 16:51

도커와 레디스를 연동하는데 에러가 발생했다. 내가 작성하려고 했던 구조는 아래와 같다. Docker 내부에서 Spring이 실행되고있고, AWS EC2 Host 서버에서 Redis를 돌리는 상태이다. 문제는 Spring 내부의 코드에서 발생하고 있었다. 문제 V1 일단 기존 코드에서는 아래와 같이 application.yml을 3가지 버전으로 나눠서 사용하고 있었다. dev는 로컬에서 동작하는 H2, Redis는 localhost에서 동작하도록 작성이 되어있었다. 이것저것 문제점을 찾다보니 application-prod 에 적용되어있는 해당 부분이 정상적으로 읽히고 있지않았다. 그래서 에러가 발생하는것. REDIS_HOST에 host의 IP를 입력해도 동작을 시켜놓으면 localhost:6379로 실행되..

InvalidDataAccessApi UsageException 에러 발생
Error Logs🐾 2023. 12. 17. 19:23

2023-12-17 18:10:33.956 ERROR 11520 --- [nio-8080-exec-1] t.s.g.e.e.RestControllerAdvice : Unknown error org.springframework.dao.InvalidDataAccessApiUsageException happened: No EntityManager with actual transaction available for current thread - cannot reliably process 'remove' call; nested exception is javax.persistence.TransactionRequiredException: No EntityManager with actual transaction avai..

JPA casecade 에러
Error Logs🐾 2023. 9. 17. 02:37

error log org.springframework.dao.InvalidDataAccessApiUsageException: org.hibernate.TransientPropertyValueException: object references an unsaved transient instance - save the transient instance before flushing : com.codestates.server.domain.license.licensedate.entity.License.licenseInfo -> com.codestates.server.domain.license.licenseinfo.entity.LicenseInfo; nested exception is java.lang.Illegal..

@RequestBody 사용 Json데이터, DTO없이 받는방법
Error Logs🐾 2023. 8. 20. 17:55

문제 @PostMapping 과 @PatchMapping에서는 DTO를 만들어 @RequestBody를 이용해 데이터를 받았다. 하지만 @DeleteMapping에서는 DTO를 만들어서 받을정도로 데이터가 많이 필요하지않았다. 필요한데이터는 userId 단하나이기때문에 아래 코드와 같이 데이터를 받으려고 시도하였다. @DeleteMapping("/delete/{question-id}") public ResponseEntity deleteQuestion(@PathVariable("question-id") Long questionId, @RequestBody Long userId){ //userId를 Long으로 받음 questionService.deleteQuestion(questionId, userId)..

h2 DB 에러
Error Logs🐾 2023. 7. 31. 21:20

error Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement "create table [*]order (id bigint generated by default as identity, completed boolean not null, title varchar(255) not null, todo_order bigint not null, primary key (id))"; expected "identifier"; SQL statement: create table order (id bigint generated by default as identity, completed boolean not null, title v..

profile on loading

Loading...