5/9 Helpring 프로젝트 에러 로그

jyleever·2022년 5월 9일
0

Helpring 에러 로그

목록 보기
1/12

repository query 관련

com.jy.helpring.domain.post.PostRepository.findByCategory_NameAndByMember_Id
(java.lang.String,java.lang.Long,org.springframework.data.domain.Pageable)!
No property 'byMember' found for type 'Post'!; nested exception is java.lang.IllegalArgumentException:
Failed to create query for method public abstract org.springframework.data.domain.Page

해결

  • findByCategory_NameAndByMember_Id -> findByCategory_NameAndMember_Id

could not resolve placeholder ~ application.yml

org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'fileStore': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException:
Could not resolve placeholder 'file.dir' in value "${file.dir}"

해결

file: dir = "경로" -> file: dir : 경로

file:
  dir: C:\intellij\workspace\helpring\helpring\src\main\resources\static\post_upload\

JavaMailSender 의존성 에러

Parameter 0 of constructor in com.jy.helpring.service.mail.MailServiceImpl required a bean of type 'org.springframework.mail.javamail.JavaMailSender' that could not be found.

Consider defining a bean of type 'org.springframework.mail.javamail.JavaMailSender' in your configuration.

해결

  • 포트 등 메일 관련 설정을 하지 않아서 생긴 에러였다. application.yml에 포트 설정을 작성해준다.

Invalid mapping on handler class

ConfigServletWebServerApplicationContext : Exception encountered during context initialization 
- cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource 
[org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]:
Invocation of init method failed; nested exception is java.lang.IllegalStateException:
Invalid mapping on handler class [com.jy.helpring.web.controller.lecture.MemberWishLectureRestController]:
public org.springframework.http.ResponseEntity com.jy.helpring.web.controller.lecture.MemberWishLectureRestController.delete(java.lang.Long)

해결

닫는 괄호를 쓰지 않은 오타로 에러가 떴다...
@DeleteMapping("/{wish_id") -> @DeleteMapping("/{wish_id}")

0개의 댓글