Error 9

[Springboot - 에러해결] ResponseEntity 한국어 데이터 깨짐

1. 에러 메시지 Resolved [org.springframework.web.HttpMediaTypeNotAcceptableException: Could not find acceptable representation] 2. 원인 - PaymentController 1 2 3 4 5 6 7 8 9 10 11 12 @PostMapping("/new") @ResponseBody public ResponseEntity savePayment(@RequestBody PaymentRequest paymentRequest) { log.info("Payment controller: /api/payment/new ---------------------"); // // 빌링키 발급에 실패한 경우 if (billingKey..

Error 2022.09.03

[Springboot - 에러해결]Resolved [org.springframework.web.HttpMediaTypeNotAcceptableException: Could not find acceptable representation]

1. 에러 메시지 Resolved [org.springframework.web.HttpMediaTypeNotAcceptableException: Could not find acceptable representation] 2. 원인 - ContentsController 1 2 3 4 5 6 7 8 9 10 11 12 13 14 /** * content의 이미지 저장 */ @PostMapping("/new/image") public ResponseEntity saveImage(@RequestPart(required = false) MultipartFile newImage) throws IOException { log.info("Contents controller: api/contents/new/image -..

Error 2022.08.30

[Spring boot- 에러 해결] nested exception is org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "SPRING_SESSION" not found; SQL statement

1. 에러 메시지 nested exception is org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "SPRING_SESSION" not found; SQL statement 2. 원인 데이터베이스에 세션 저장소를 사용하기 위한 설정을 한 이후 서버를 킬 때 다음과 오류를 확인하였다. 3. 해결 1 spring.session.jdbc.initialize-schema=always // 추가 application.properties에 다음 줄을 추가해주고 다시 springboot 서버를 실행시키면 정상적으로 돌아가는 것을 확인할 수 있다. 참고 사이트 - https://velog.io/@mmy789/Spring-AWS-9

Error 2022.06.25

[Spring boot, JPA - 에러 해결] Caused by: org.hibernate.AnnotationException: Illegal attempt to map a non collection

1. 에러 메시지 Caused by: org.hibernate.AnnotationException: Illegal attempt to map a non collection as a @OneToMany, @ManyToMany or @CollectionOfElements: 2. 원인 1 2 3 4 5 6 7 8 9 10 11 12 // User entity 부분 @OneToMany(mappedBy = "user") private Subscribe subscribe; --------------------------------------------------------------- // Subscribe entity 부분 @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(nam..

Error 2022.06.14

[Spring boot - 에러 해결] org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/octet-stream' not supported

1. 에러 메시지 Resolved [org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/octet-stream' not supported] 2. 원인 1 2 3 4 5 6 7 8 9 10 11 12 13 14 @PostMapping("/new") public ResponseEntity saveContents(@RequestPart(required = false) AllContentsRequest contentsRequest) throws IOException { log.info("Contents controller: api/contents/new ---------------------"); LinkedL..

Error 2022.06.03

[Spring boot - 에러 해결] Bytecode enhancement failed because no public, protected or package private default constructor was found for entity

1. 에러 메시지 Bytecode enhancement failed because no public, protected or package private default constructor was found for entity. 2. 원인 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 @Entity @Getter @Setter public class Writer extends BaseTimeEntity{ @Id @GeneratedValue @Column(name = "writer_id") private Long id; // id private String name; // 작가 이름 @OneToMany(mappedBy = "publisher..

Error 2022.05.18

[JPA, Mysql - 에러 해결] Caused by: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near

1. 에러 메시지 Caused by: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'group' at line 1 2. 원인 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 @Entity @Getter @Setter public class Group extends BaseTimeEntity{ @Id @GeneratedValue @Column(name = "group_id") private Long id; ..

Error 2022.05.17

[SpringBoot - - 에러 해결] Caused by: java.lang.IllegalStateException: Can't configure anyRequest after itself

1. 에러 메시지 Caused by: java.lang.IllegalStateException: Can't configure anyRequest after itself 2. 원인 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 @EnableWebSecurity public class SecurityConfig extends WebSecurityConfigurerAdapter { @Autowired private CustomOauth2UserService customOauth2UserService; @Override protected void configure(HttpSecurity http) throws Exception { ht..

Error 2022.05.03