월 66,000원
5개월 할부 시다른 수강생들이 자주 물어보는 질문이 궁금하신가요?
- 미해결스프링과 JPA 기반 웹 애플리케이션 개발
AccountPredicates 클래스 질문있습니다.
안녕하세요. AccountPredicates클래스에서 태그와 지역정보를 찾는 메소드를 static으로 선언해두신 이유가 궁금해서 질문남깁니다! 생성자 주입을 받지 않고 단순히 아래와 같이 static method로 사용하기 위함인가요?? public static Predicate findByTagsAndZones(Set<Tag> tags, Set<Zone> zones) AccountPredicates.findByTagsAndZones
- 미해결스프링과 JPA 기반 웹 애플리케이션 개발
갑자기 testcontainer 빌드 실패
안녕하세요. 기존에 작동하던 testcontainer인데 querydsl 플러그인을 연동하던중 잘 되지 않아서 원복을 했음에도 불구하고, 아래와같은 상황이 발생해 ./gradlew --warning-mode=all 에서 경고 다 없애고, 모든 방법을 다 찾아서 해본 것 같은데 갑자기 왜 이러는지 모르겠어서 어느 부분을 확인해 봐야 하는 지 힌트를 얻을 수 있을까요? 그래들 6.4.1 이어서 5.6으로 다운그레이드도 해보았습니다. 기존에 의존성은 https://www.testcontainers.org/quickstart/junit_5_quickstart/ https://www.testcontainers.org/ 를 참고해서 동작하도록 구현해서 도커에서 테스트까지 완료했었는데 단순히 빌드스크립트를 돌렸다가 원복을했는데..? 작동이되지않아서 멘붕인 상황입니다..
- 미해결스프링과 JPA 기반 웹 애플리케이션 개발
이 에러는 무엇인가요?
java.lang.AssertionError: Range for response status value 200 expected: but was: Expected :REDIRECTION Actual :SUCCESSFUL .andExpect(status().is3xxRedirection()) 를 주석처리하고 다시 실행해보니, java.lang.AssertionError: View name expected: but was:<account/sign-up> Expected :redirect:/ Actual :account/sign-up 이 에러는 왜 그런건가요? 조건에 맞게 정상적으로 닉네임,이메일,패스워드 입력을 했는데.. 왜 그런가요? --- 200(성공): 서버가 요청을 제대로 처리했다...그리고 succesful 됫다는데.. 그럼 오류가 아닌것인가요? 참고로 테스트가 아닌 App로 실행해서 똑같이 값(닉네임,이메일,패스워드)를 입력하면 redirect:/ return이 되어 index.html home으로 가게됩니다.. 근데 테스트에서 저런에러가 ㅠㅠ 검색해도 안나오네요
- 해결됨스프링과 JPA 기반 웹 애플리케이션 개발
intellij 강의는 아니지만 intellij 관련 문의를 좀 드리고 싶습니다.
intellij 사용해서 spring boot 개발시 인터넷에서 예제를 찾아서 보다 보면 모듈형식으로 되어 있는 예제들이 많은데.. 일반적으로 만든 경우라면 intellij 화면에 우측 상단에 실행 버튼을 클릭해서 실행을 하게됩니다. 모듈형식으로 만들어진 예제나 멀티 프로젝트로 만든 예제 같은 경우는 실행해 볼수 있는 방법을 잘 몰라서 확인이 어려운 경우가 있습니다. 방법을 좀 알려 주실수 있을까요?
- 미해결스프링과 JPA 기반 웹 애플리케이션 개발
whitelist 의 데이터가 데이터가 많을때 처리 방법 문의.
안녕하세요. 강의 잘 듣고있습니다. 관심 주제 자동완성 부분에서 tagify js를 사용해서 자동완성을 처리하는 부분에서 질문이 있습니다. 예를 들어 자동완성으로 보여주고 싶은 데이터가 1,000,000 개의 row가 있습니다. 강의에서 나온대로 적용을 했을시 전체를 조회하게 되어 어플리케이션이 느려질수도 있을것 같습니다. 그래서 "tagify js whitelist many data" 해당 키워드로 구글링을 해보았는데, 마땅한 답변이 찾기가 힘드네요. 키워드만 알려주시면 제가 찾아보도록 하겠습니다. 항상 좋은 강의 감사합니다.
- 미해결스프링과 JPA 기반 웹 애플리케이션 개발
Errors나 BindingResult 사용시 주의할점이 있습니다.
디버그와 원인을 찾는데 꽤 많은 시간이 들어 혹시 제가 겪었던 상황과 비슷한 일을 겪는 분이 계실 것 같아 적었습니다. 스터디 생성시 이미 존재하는 path로 요청을 날렸는데 제가 생각했던 대로 동작을 하지 않았습니다. 제가 예상했던 동작은 validator를 통해 이미 존재하는 경우 errors.rejectValue()로 필드에 에러코드를 추가하였으니 Post요청시 에러가 존재하니 study/form를 보여주고 등록 화면에서는 validator에서 적어준 메세지가 보여야 한다 였는데 예상과는 다르게 whitelabel 에러 페이지와 함께 BindException이 발생하였습니다. org.springframework.validation.BindException: org.springframework.validation.BeanPropertyBindingResult: 1 errors 디버그를 해봐도 validator에서 에러코드 추가까지는 정상 동작하는데 post에서 break point로 잡히지 않았습니다. 영상을 시청하기 전에 코드를 작성하여 잘못 구현하였나 싶어 완성된 코드와 비교해보니 post요청에서 Model 인스턴스를 파라미터로 선언할 때 Errors보다 먼저 선언한 것을 발견하였습니다. @PostMapping("/new-study")public String newStudySubmit(@CurrentUser Account account, @Valid StudyForm studyForm, Model model,Errors errors) { if (errors.hasErrors()) { model.addAttribute(account); return "study/form"; } // 새 스터디 등록 후 redirect...}@PostMapping("/new-study")public String newStudySubmit(@CurrentUser Account account, @Valid StudyForm studyForm, Errors errors, Model model) { if (errors.hasErrors()) { model.addAttribute(account); return "study/form"; } // 새 스터디 등록 후 redirect...} 그래서 파라미터의 순서에 영향을 받는다고 하고 넘어가려다 스프링 레퍼런스를 찾아보고 확실히 할 수 있었습니다. Errors, BindingResult : For access to errors from validation and data binding for a command object (that is, a @ModelAttribute argument) or errors from the validation of a @RequestBody or @RequestPart arguments. You must declare an Errors, or BindingResult argument immediately after the validated method argument. https://docs.spring.io/spring/docs/current/spring-framework-reference/web.html#mvc-ann-arguments
- 미해결스프링과 JPA 기반 웹 애플리케이션 개발
@Valid 에러 메세지관련
좋은 강의 감사합니다. 제가 일본에서 일하는중이라서 왠만하면 일본어를 사용하는데 닉네임을 이렇게 메세지를 일본어로 넣지않는이상 한국말로 에러 메세지가 표시되던데 언어 변경이 따로 있나요? (참고로 맥사용중, 맥언어가 한국어, 인텔리제이는 영어 입니다.)
- 미해결스프링과 JPA 기반 웹 애플리케이션 개발
postgresql 설정 관련 질문
안녕하세요. 저는 postgresql 관련 설정에서 clob 타입을 지원해주지 않아서 설정을 추가줬는데, 선생님은 어떻게 추가 설정을 하지 않았는데 정상 작동했는지(?) 궁금해서 여쭤봐도 될까요?? (단순히 궁금해서요..!) 감사합니다.
- 미해결스프링과 JPA 기반 웹 애플리케이션 개발
취소하기후 재등록시 버그가 있는듯합니다.
이미지 등록 - 취소하기 - 다시 동일한 이미지 등록시 반응이 없습니다. 취소하기버튼에서 hidden타입의 profileImage의 값만 초기화하여서 다시 등록시에 $("#profile-image-file")의 변화를 감지하지 못하여서 그런듯합니다. 취소하기에 아래코드가 추가하면 정상동작합니다. $("#profile-image-file").val('');
- 미해결스프링과 JPA 기반 웹 애플리케이션 개발
file not found 질문
안녕하세요, Path를 가져오는 부분(resources.getFile()) 에서 자꾸 file not found를 던지는데 왜 그런지 도무지 이해가 가지 않습니다. csv 파일의 경로는 resources/zone_kr.csv 입니다. resource import 도 spring.core.io.Resource를 사용했습니다.
- 해결됨스프링과 JPA 기반 웹 애플리케이션 개발
엔티티에 저장이 안되는 문제에 대한 문의
안녕하세요. 강의 잘 보았습니다. 강의 도움 받아서 테스트 진행해보고 있는데요. 저장이 안되는 부분에 대해 문의 드려봅니다. Car, Camp 엔티티가 있고 Car 전체 데이터 읽어서 특정 필드의 값을 Camp 에서 찾아서 업데이트하는 로직입니다. if (carRepository.count() > 0) { carRepository.findAll().stream().forEach(s -> { String campName = s.getCampEngName(); Optional<Car> car = carRepository.findById(s.getId()); Camp camp = campRepository.findByEngName(campName); if (camp != null) { car.ifPresent(m -> m.setNote(camp.getKorName())); } });} 해당 부분 코드는 이렇게 했는데, 수행 후에 실제 Car 엔티티의 note 값이 변경이 안되어있습니다. 로그 찍어보면 campName 값은 일일이 잘 가져오고 있는데 setNote로 저장이 안됩니다. 트랜젝션 문제일까요? 강의를 제대로 소화를 못했는지 원인을 못찾겠네요. ㅠㅠ 도움 부탁드립니다. 아.. 저게 수행되는 곳이, 일반 컨트롤러 통해서 들어오는게 아니라 최초 실행시점입니다.(혹시 이게 문제일까요?) @PostConstruct public void initCarData() throws IOException { ... if (carRepository.count() > 0) { } ... } 이 부분입니다.
- 미해결스프링과 JPA 기반 웹 애플리케이션 개발
테스트 코드 질문있습니다.
안녕하세요. 회원계정에 해당하는 태그를 조회하는 서비스로직 getTags에서 궁금한점이 있습니다. 저는 자바8을 사용하고있어서(sysout은 나중에 찍었습니다.) public Set<Tag> getTags(Account account) { Optional<Account> byId = accountRepository.findById(account.getId()); System.out.println("byid : " + byId.orElseThrow(NullPointerException::new).getTags()); System.out.println(byId); //없으면 에러를 던지고 있으면 태그를 가져온다 return byId.orElseThrow(NullPointerException::new).getTags(); } //결과값 byid : null Optional[com.jpa.studywebapp.domain.Account@3c] 위와같이 orElseThrow에 인자를 채워서 사용했습니다 그런데 자꾸 테스트에서 NPE가 발생했는데, 신기한점은 실제로 byid는 출력이 되는데 orElseThrow().getTags를 거치면 null이 출력이됩니다. 이 부분은 Detached상태도 아닌데 왜 자꾸 NPE가 출력이 되는지 궁금합니다.
- 미해결스프링과 JPA 기반 웹 애플리케이션 개발
th:field에서 에러발생
타이핑을 잘못했나 싶어 작성되있는 html을 가져와서도 확인하였으나 동일한 현상이 발생합니다. th:field=*{nickname}"부분에서 Error during execution of processor 'org.thymeleaf.spring5.processor.SpringInputGeneralFieldTagProcessor' Bean property 'nickname' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter? SignUpForm에 getter setter를 추가하면 해당문제가 발생하지 않습니다.
- 미해결스프링과 JPA 기반 웹 애플리케이션 개발
패스워드 없이 로그인하기 질문 드립니다.
안녕하세요 ㅎㅎ 좋은 강의 잘 듣고있습니다. 강의를 따라하다 문제가 발생했습니다. 패스워드 없이 로그인하기에서 콘솔에 찍힌 링크를 복사해서 이동하면 로그인 화면이 나옵니다. 나온 로그인화면에서 로그인을 해야지 logged-in-by-email.html이 나옵니다. 디버깅 해보니까 콘솔의 링크로 이동하면 mainController의 login에서 먼저 걸리더군요 이것때문인것 같습니다 ㅠㅠ 강사님께서 올려주신 완성본이랑 비교를 해봣는데도 뭐가 문젠지 모르겠습니다 ㅠㅠ 도와주세요!
- 미해결스프링과 JPA 기반 웹 애플리케이션 개발
@NamedEntityGraph 와 Fetch
안녕하세요, 강의 잘 보고 있습니다. @NamedEntityGraph로 N+1 select를 해결하는것은 잘 되는데요, 문득 궁금증이 생겨 @NamedEntityGraph를 제거하고 그냥 해당 필드에 EAGER를 붙여보았습니다. Notification entity를 조회할 때 참조하고있는 Tag entity를 같이 가져오는 것을 구현연습 하고 있었습니다. Notification.java @Entity @Getter @Setter @EqualsAndHashCode(of = "id") @NoArgsConstructor public class Notification { @Id @GeneratedValue private Long id; @Enumerated(EnumType.STRING) private NotificationType notificationType; private String title; private String link; private boolean ringBellChecked = false; private boolean linkVisited = false; @ManyToOne private Account account; @ManyToMany(fetch = FetchType.EAGER) private List<Tag> commonTag = new LinkedList<>(); private LocalDateTime createdDateTime; } NotificationRepository.java public interface NotificationRepository extends JpaRepository<Notification, Long> { List<Notification> findByAccount(Account sessionAccount); } 그리고 이를 활용하여 NotificationService.java @Transactional @RequiredArgsConstructor @Service public class NotificationService { private final NotificationRepository notificationRepository; public List<Notification> ringBellCheck(Account sessionAccount) { List<Notification> allNotification = notificationRepository.findByAccount(sessionAccount); allNotification.forEach(notification -> { notification.setRingBellChecked(true); }); return allNotification; } } 위와같은 작업을 처리합니다. 근데 현재 Notification이 3개가 존재할 때, 2020-07-28 10:14:57.791 DEBUG 15072 --- [nio-8080-exec-9] org.hibernate.SQL : select notificati0_.id as id1_2_, notificati0_.account_id as account_8_2_, notificati0_.created_date_time as created_2_2_, notificati0_.link as link3_2_, notificati0_.link_visited as link_vis4_2_, notificati0_.notification_type as notifica5_2_, notificati0_.ring_bell_checked as ring_bel6_2_, notificati0_.title as title7_2_ from notification notificati0_ where notificati0_.account_id=? 2020-07-28 10:14:57.792 TRACE 15072 --- [nio-8080-exec-9] o.h.type.descriptor.sql.BasicBinder : binding parameter [1] as [BIGINT] - [1] 2020-07-28 10:14:57.840 DEBUG 15072 --- [nio-8080-exec-9] org.hibernate.SQL : select account0_.id as id1_0_0_, account0_.bio as bio2_0_0_, account0_.count_of_sending_email_verification_email as count_of3_0_0_, account0_.email_first_verified as email_fi4_0_0_, account0_.email_verification_token as email_ve5_0_0_, account0_.email_verified as email_ve6_0_0_, account0_.email_waiting_to_be_verified as email_wa7_0_0_, account0_.first_count_of_sending_email_verification_email_set_date_time as first_co8_0_0_, account0_.location as location9_0_0_, account0_.nickname as nicknam10_0_0_, account0_.nickname_before_update as nicknam11_0_0_, account0_.notification_comment_on_my_comment_by_email as notific12_0_0_, account0_.notification_comment_on_my_comment_by_web as notific13_0_0_, account0_.notification_comment_on_my_post_by_email as notific14_0_0_, account0_.notification_comment_on_my_post_by_web as notific15_0_0_, account0_.notification_like_on_my_comment_by_email as notific16_0_0_, account0_.notification_like_on_my_comment_by_web as notific17_0_0_, account0_.notification_like_on_my_post_by_email as notific18_0_0_, account0_.notification_like_on_my_post_by_web as notific19_0_0_, account0_.notification_my_interest_tag_added_to_existing_post_by_email as notific20_0_0_, account0_.notification_my_interest_tag_added_to_existing_post_by_web as notific21_0_0_, account0_.notification_new_post_with_my_interest_tag_by_email as notific22_0_0_, account0_.notification_new_post_with_my_interest_tag_by_web as notific23_0_0_, account0_.occupation as occupat24_0_0_, account0_.password as passwor25_0_0_, account0_.profile_image as profile26_0_0_, account0_.show_password_update_page_token as show_pa27_0_0_, account0_.sign_up_date_time as sign_up28_0_0_, account0_.user_id as user_id29_0_0_, account0_.verified_email as verifie30_0_0_ from account account0_ where account0_.id=? 2020-07-28 10:14:57.840 TRACE 15072 --- [nio-8080-exec-9] o.h.type.descriptor.sql.BasicBinder : binding parameter [1] as [BIGINT] - [1] 2020-07-28 10:14:57.888 DEBUG 15072 --- [nio-8080-exec-9] org.hibernate.SQL : select commontag0_.notification_id as notifica1_3_0_, commontag0_.common_tag_id as common_t2_3_0_, tag1_.id as id1_8_1_, tag1_.title as title2_8_1_ from notification_common_tag commontag0_ inner join tag tag1_ on commontag0_.common_tag_id=tag1_.id where commontag0_.notification_id=? 2020-07-28 10:14:57.889 TRACE 15072 --- [nio-8080-exec-9] o.h.type.descriptor.sql.BasicBinder : binding parameter [1] as [BIGINT] - [15] 2020-07-28 10:14:57.937 DEBUG 15072 --- [nio-8080-exec-9] org.hibernate.SQL : select commontag0_.notification_id as notifica1_3_0_, commontag0_.common_tag_id as common_t2_3_0_, tag1_.id as id1_8_1_, tag1_.title as title2_8_1_ from notification_common_tag commontag0_ inner join tag tag1_ on commontag0_.common_tag_id=tag1_.id where commontag0_.notification_id=? 2020-07-28 10:14:57.937 TRACE 15072 --- [nio-8080-exec-9] o.h.type.descriptor.sql.BasicBinder : binding parameter [1] as [BIGINT] - [13] 2020-07-28 10:14:57.984 DEBUG 15072 --- [nio-8080-exec-9] org.hibernate.SQL : select commontag0_.notification_id as notifica1_3_0_, commontag0_.common_tag_id as common_t2_3_0_, tag1_.id as id1_8_1_, tag1_.title as title2_8_1_ from notification_common_tag commontag0_ inner join tag tag1_ on commontag0_.common_tag_id=tag1_.id where commontag0_.notification_id=? 2020-07-28 10:14:57.984 TRACE 15072 --- [nio-8080-exec-9] o.h.type.descriptor.sql.BasicBinder : binding parameter [1] as [BIGINT] - [11] 2020-07-28 10:14:58.137 DEBUG 15072 --- [nio-8080-exec-9] org.hibernate.SQL : select count(notificati0_.id) as col_0_0_ from notification notificati0_ where notificati0_.account_id=? and notificati0_.ring_bell_checked=? 2020-07-28 10:14:58.137 TRACE 15072 --- [nio-8080-exec-9] o.h.type.descriptor.sql.BasicBinder : binding parameter [1] as [BIGINT] - [1] 2020-07-28 10:14:58.137 TRACE 15072 --- [nio-8080-exec-9] o.h.type.descriptor.sql.BasicBinder : binding parameter [2] as [BOOLEAN] - [false] 이처럼 필드에 EAGER를 붙인것은 N+1 select 문제가 해결되진 않네요. 하나의 Notification만 Id로 조회했을 때는 Tag도 같이 가져오는걸 확인했습니다. 하지만 List<Notification>에서는 적용이 안되네요. 필드에 EAGER를 붙이는 것은 하나만 조회할 때 유효한 건가요? 그리고 NotificationInterceptor.java에서 SecurityContextHolder에서 세션객체 꺼내서 해당 세션객체로 Notification를 조회할 때는 왜 Account를 조회하는 쿼리는 안날아가나요? detached상태인데.. NotificationService에서 Account로 Notification을 조회했을 때는 새로 Account를 다시 조회하는 쿼리가 날아가는데..
- 미해결스프링과 JPA 기반 웹 애플리케이션 개발
archunit 디펜던시를 추가 했더니 기존 테스트가 안됩니다.
pom.xml 에 archunit 디펜던시만 추가하고 기존 테스트를 실행해 봤더니 아래와 같은 에러가 납니다.(AccountControllerTest 등등) 16:30:39.567 [main] DEBUG com.tngtech.archunit.ArchConfiguration - No configuration found in classpath at archunit.properties => Using default configuration 디펜던시만 지우면 잘 되고요 도움 주실 수 있을까요?
- 미해결스프링과 JPA 기반 웹 애플리케이션 개발
테스트DB를 PostgreSQL 로 전환 후 테스트 수행시 오류
안녕하세요. 강의에 나온대로 진행 후 테스트 수행하니 아래와 같이 오류가 납니다. 무슨 문제일까요? java.lang.ExceptionInInitializerError at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490) at org.junit.platform.commons.util.ReflectionUtils.newInstance(ReflectionUtils.java:511) at org.junit.jupiter.engine.execution.ConstructorInvocation.proceed(ConstructorInvocation.java:56) at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131) at org.junit.jupiter.api.extension.InvocationInterceptor.interceptTestClassConstructor(InvocationInterceptor.java:72) at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105) at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37) at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104) at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:77) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestClassConstructor(ClassBasedTestDescriptor.java:333) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateTestClass(ClassBasedTestDescriptor.java:280) at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.instantiateTestClass(ClassTestDescriptor.java:77) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:262) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$2(ClassBasedTestDescriptor.java:256) at java.base/java.util.Optional.orElseGet(Optional.java:369) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$3(ClassBasedTestDescriptor.java:255) at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:29) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:108) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:107) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:71) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$1(NodeTestTask.java:107) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:107) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:75) at java.base/java.util.ArrayList.forEach(ArrayList.java:1540) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80) at java.base/java.util.ArrayList.forEach(ArrayList.java:1540) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32) at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:248) at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$5(DefaultLauncher.java:211) at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:226) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:199) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:132) at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:69) at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33) at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:230) at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:58) Caused by: org.testcontainers.containers.ContainerLaunchException: Container startup failed at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:322) at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:302) at com.etopia.studyolle.infra.AbstractContainerBaseTest.<clinit>(AbstractContainerBaseTest.java:10) ... 63 more Caused by: org.testcontainers.containers.ContainerFetchException: Can't get Docker image: RemoteDockerImage(imageNameFuture=java.util.concurrent.CompletableFuture@28486680[Completed normally], imagePullPolicy=DefaultPullPolicy(), dockerClient=LazyDockerClient.INSTANCE) at org.testcontainers.containers.GenericContainer.getDockerImageName(GenericContainer.java:1265) at org.testcontainers.containers.GenericContainer.logger(GenericContainer.java:600) at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:311) ... 65 more Caused by: java.lang.IllegalStateException: Could not find a valid Docker environment. Please see logs and check configuration at org.testcontainers.dockerclient.DockerClientProviderStrategy.lambda$getFirstValidStrategy$3(DockerClientProviderStrategy.java:163) at java.base/java.util.Optional.orElseThrow(Optional.java:408) at org.testcontainers.dockerclient.DockerClientProviderStrategy.getFirstValidStrategy(DockerClientProviderStrategy.java:155) at org.testcontainers.DockerClientFactory.getOrInitializeStrategy(DockerClientFactory.java:113) at org.testcontainers.DockerClientFactory.client(DockerClientFactory.java:134) at org.testcontainers.LazyDockerClient.getDockerClient(LazyDockerClient.java:14) at org.testcontainers.LazyDockerClient.listImagesCmd(LazyDockerClient.java:12) at org.testcontainers.images.LocalImagesCache.maybeInitCache(LocalImagesCache.java:68) at org.testcontainers.images.LocalImagesCache.get(LocalImagesCache.java:32) at org.testcontainers.images.AbstractImagePullPolicy.shouldPull(AbstractImagePullPolicy.java:18) at org.testcontainers.images.RemoteDockerImage.resolve(RemoteDockerImage.java:62) at org.testcontainers.images.RemoteDockerImage.resolve(RemoteDockerImage.java:25) at org.testcontainers.utility.LazyFuture.getResolvedValue(LazyFuture.java:20) at org.testcontainers.utility.LazyFuture.get(LazyFuture.java:27) at org.testcontainers.containers.GenericContainer.getDockerImageName(GenericContainer.java:1263) ... 67 more
- 해결됨스프링과 JPA 기반 웹 애플리케이션 개발
@PathVariable 바인딩 변경 후 오류 문의
70. 모임참가 신청 수락 취소 및 출석체크 강의 중 문의사항입니다. 강의 중간쯤 나오는 내용대로, 이렇게 수정한 후에 실행하면 해당 컨트롤러 호출할때 오류가 발생합니다. @PathVariable Long id @PathVariable("id") Event event EventController 클래스 전체에 적용했는데 적용한 모든곳에서 발생하네요.. 어떤 실수를 한 걸까요?? ㅠㅠ ------------------------------------------------------- There was an unexpected error (type=Internal Server Error, status=500). Failed to convert value of type 'java.lang.String' to required type 'com.studyolle.domain.Event'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'java.lang.String' to required type 'com.studyolle.domain.Event': no matching editors or conversion strategy found org.springframework.web.method.annotation.MethodArgumentConversionNotSupportedException: Failed to convert value of type 'java.lang.String' to required type 'com.studyolle.domain.Event'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'java.lang.String' to required type 'com.studyolle.domain.Event': no matching editors or conversion strategy found ...
- 미해결스프링과 JPA 기반 웹 애플리케이션 개발
querydsl 빌드 에러 질문드립니다.
안녕하세요 기선님, 강의 잘 보고 있습니다. 우선, 강의는 maven으로 진행되었는데 gradle 관련 질문이라.. 죄송힙니다. 그래도 너무 답답하고 구글링을 몇시간 째 해도 안돼서 지푸라기라도 잡는 심정으로 질문을 남겨 봅니다. 저는 현재 Gradle 6버전대를 사용하고 있는데요, querydsl 의존성 설정을 추가하고 빌드하여 Q클래스들을 모두 생성했고, 이를 활용하여 Predicate 쿼리들을 강의대로 코딩하였습니다. 코딩 시 자동완성도 모두 문제없이 잘 되었습니다. 처음 의존성 추가 및 빌드와 어플리케이션 실행, 그리고 직접 테스트 해봤을 때, 모두 정상적으로 잘 되었습니다. 쿼리들도 정상적으로 동작합니다. 프로젝트 github 링크는 아래와 같고, https://github.com/taehee-kim-dev/portfolio2 build.gradle 파일은 아래와 같습니다. https://github.com/taehee-kim-dev/portfolio2/blob/master/build.gradle 이후 어플리케이션 실행은 잘 됩니다. 어플리케이션 재시작을 누르면 잘 실행 되는데, Ctrl + F9(빌드)만 다시하면 아래와 같은 에러가 납니다. 오전 3:42:54: Executing tasks ':classes :testClasses :querydslClasses'... Starting Gradle Daemon... Gradle Daemon started in 1 s 601 ms > Task :initQuerydslSourcesDir > Task :compileQuerydsl Note: Running JPAAnnotationProcessor Note: Serializing Entity types Note: Generating portfolio2.module.tag.QTag for [portfolio2.module.tag.Tag] Note: Generating portfolio2.module.account.QAccount for [portfolio2.module.account.Account] Note: Generating portfolio2.module.post.QPost for [portfolio2.module.post.Post] Note: Generating portfolio2.module.notification.QNotification for [portfolio2.module.notification.Notification] Note: Generating portfolio2.module.account.config.QPersistentLogins for [portfolio2.module.account.config.PersistentLogins] Note: Running JPAAnnotationProcessor Note: Running JPAAnnotationProcessor > Task :compileJava > Task :processResources > Task :classes > Task :compileTestJava > Task :processTestResources > Task :testClasses > Task :compileQuerydslJava FAILED C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\config\QPersistentLogins.java:3: error: package com.querydsl.core.types does not exist import static com.querydsl.core.types.PathMetadataFactory.*; ^ C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\config\QPersistentLogins.java:7: error: package com.querydsl.core.types does not exist import com.querydsl.core.types.PathMetadata; ^ C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\config\QPersistentLogins.java:8: error: package javax.annotation does not exist import javax.annotation.Generated; ^ C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\config\QPersistentLogins.java:9: error: package com.querydsl.core.types does not exist import com.querydsl.core.types.Path; ^ C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\config\QPersistentLogins.java:16: error: cannot find symbol public class QPersistentLogins extends EntityPathBase<PersistentLogins> { ^ symbol: class EntityPathBase C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\config\QPersistentLogins.java:15: error: cannot find symbol @Generated("com.querydsl.codegen.EntitySerializer") ^ symbol: class Generated C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\config\QPersistentLogins.java:16: error: cannot find symbol public class QPersistentLogins extends EntityPathBase<PersistentLogins> { ^ symbol: class PersistentLogins C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\config\QPersistentLogins.java:22: error: cannot find symbol public final DateTimePath<java.time.LocalDateTime> lastUsed = createDateTime("lastUsed", java.time.LocalDateTime.class); ^ symbol: class DateTimePath location: class QPersistentLogins C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\config\QPersistentLogins.java:24: error: cannot find symbol public final StringPath series = createString("series"); ^ symbol: class StringPath location: class QPersistentLogins C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\config\QPersistentLogins.java:26: error: cannot find symbol public final StringPath token = createString("token"); ^ symbol: class StringPath location: class QPersistentLogins C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\config\QPersistentLogins.java:28: error: cannot find symbol public final StringPath username = createString("username"); ^ symbol: class StringPath location: class QPersistentLogins C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\config\QPersistentLogins.java:34: error: cannot find symbol public QPersistentLogins(Path<? extends PersistentLogins> path) { ^ symbol: class Path location: class QPersistentLogins C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\config\QPersistentLogins.java:34: error: cannot find symbol public QPersistentLogins(Path<? extends PersistentLogins> path) { ^ symbol: class PersistentLogins location: class QPersistentLogins C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\config\QPersistentLogins.java:38: error: cannot find symbol public QPersistentLogins(PathMetadata metadata) { ^ symbol: class PathMetadata location: class QPersistentLogins C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\config\QPersistentLogins.java:5: error: package com.querydsl.core.types.dsl does not exist import com.querydsl.core.types.dsl.*; ^ C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:3: error: package com.querydsl.core.types does not exist import static com.querydsl.core.types.PathMetadataFactory.*; ^ C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:7: error: package com.querydsl.core.types does not exist import com.querydsl.core.types.PathMetadata; ^ C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:8: error: package javax.annotation does not exist import javax.annotation.Generated; ^ C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:9: error: package com.querydsl.core.types does not exist import com.querydsl.core.types.Path; ^ C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:10: error: package com.querydsl.core.types.dsl does not exist import com.querydsl.core.types.dsl.PathInits; ^ C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:17: error: cannot find symbol public class QAccount extends EntityPathBase<Account> { ^ symbol: class EntityPathBase C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:16: error: cannot find symbol @Generated("com.querydsl.codegen.EntitySerializer") ^ symbol: class Generated C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:17: error: cannot find symbol public class QAccount extends EntityPathBase<Account> { ^ symbol: class Account C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:23: error: cannot find symbol public final StringPath bio = createString("bio"); ^ symbol: class StringPath location: class QAccount C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:25: error: cannot find symbol public final NumberPath<Integer> countOfSendingEmailVerificationEmail = createNumber("countOfSendingEmailVerificationEmail", Integer.class); ^ symbol: class NumberPath location: class QAccount C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:27: error: cannot find symbol public final StringPath emailVerificationToken = createString("emailVerificationToken"); ^ symbol: class StringPath location: class QAccount C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:29: error: cannot find symbol public final StringPath emailWaitingToBeVerified = createString("emailWaitingToBeVerified"); ^ symbol: class StringPath location: class QAccount C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:31: error: cannot find symbol public final DateTimePath<java.time.LocalDateTime> firstCountOfSendingEmailVerificationEmailSetAt = createDateTime("firstCountOfSendingEmailVerificationEmailSetAt", java.time.LocalDateTime.class); ^ symbol: class DateTimePath location: class QAccount C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:33: error: cannot find symbol public final NumberPath<Long> id = createNumber("id", Long.class); ^ symbol: class NumberPath location: class QAccount C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:35: error: cannot find symbol public final SetPath<portfolio2.module.tag.Tag, portfolio2.module.tag.QTag> interestTag = this.<portfolio2.module.tag.Tag, portfolio2.module.tag.QTag>createSet("interestTag", portfolio2.module.tag.Tag.class, portfolio2.module.tag.QTag.class, PathInits.DIRECT2); ^ symbol: class SetPath location: class QAccount C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:35: error: cannot find symbol public final SetPath<portfolio2.module.tag.Tag, portfolio2.module.tag.QTag> interestTag = this.<portfolio2.module.tag.Tag, portfolio2.module.tag.QTag>createSet("interestTag", portfolio2.module.tag.Tag.class, portfolio2.module.tag.QTag.class, PathInits.DIRECT2); ^ symbol: class Tag location: package portfolio2.module.tag C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\tag\QTag.java:3: error: package com.querydsl.core.types does not exist import static com.querydsl.core.types.PathMetadataFactory.*; ^ C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\tag\QTag.java:7: error: package com.querydsl.core.types does not exist import com.querydsl.core.types.PathMetadata; ^ C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\tag\QTag.java:8: error: package javax.annotation does not exist import javax.annotation.Generated; ^ C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\tag\QTag.java:9: error: package com.querydsl.core.types does not exist import com.querydsl.core.types.Path; ^ C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\tag\QTag.java:16: error: cannot find symbol public class QTag extends EntityPathBase<Tag> { ^ symbol: class EntityPathBase C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\tag\QTag.java:15: error: cannot find symbol @Generated("com.querydsl.codegen.EntitySerializer") ^ symbol: class Generated C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\tag\QTag.java:16: error: cannot find symbol public class QTag extends EntityPathBase<Tag> { ^ symbol: class Tag C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:37: error: cannot find symbol public final BooleanPath isEmailFirstVerified = createBoolean("isEmailFirstVerified"); ^ symbol: class BooleanPath location: class QAccount C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:39: error: cannot find symbol public final BooleanPath isEmailVerified = createBoolean("isEmailVerified"); ^ symbol: class BooleanPath location: class QAccount C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:41: error: cannot find symbol public final DateTimePath<java.time.LocalDateTime> joinedAt = createDateTime("joinedAt", java.time.LocalDateTime.class); ^ symbol: class DateTimePath location: class QAccount C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:43: error: cannot find symbol public final StringPath location = createString("location"); ^ symbol: class StringPath location: class QAccount C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:45: error: cannot find symbol public final StringPath nickname = createString("nickname"); ^ symbol: class StringPath location: class QAccount C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:47: error: cannot find symbol public final StringPath nicknameBeforeUpdate = createString("nicknameBeforeUpdate"); ^ symbol: class StringPath location: class QAccount C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:49: error: cannot find symbol public final BooleanPath notificationLikeOnMyPostByEmail = createBoolean("notificationLikeOnMyPostByEmail"); ^ symbol: class BooleanPath location: class QAccount C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:51: error: cannot find symbol public final BooleanPath notificationLikeOnMyPostByWeb = createBoolean("notificationLikeOnMyPostByWeb"); ^ symbol: class BooleanPath location: class QAccount C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:53: error: cannot find symbol public final BooleanPath notificationLikeOnMyReplyByEmail = createBoolean("notificationLikeOnMyReplyByEmail"); ^ symbol: class BooleanPath location: class QAccount C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:55: error: cannot find symbol public final BooleanPath notificationLikeOnMyReplyByWeb = createBoolean("notificationLikeOnMyReplyByWeb"); ^ symbol: class BooleanPath location: class QAccount C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:57: error: cannot find symbol public final BooleanPath notificationNewPostWithMyTagByEmail = createBoolean("notificationNewPostWithMyTagByEmail"); ^ symbol: class BooleanPath location: class QAccount C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:59: error: cannot find symbol public final BooleanPath notificationNewPostWithMyTagByWeb = createBoolean("notificationNewPostWithMyTagByWeb"); ^ symbol: class BooleanPath location: class QAccount C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:61: error: cannot find symbol public final BooleanPath notificationReplyOnMyPostByEmail = createBoolean("notificationReplyOnMyPostByEmail"); ^ symbol: class BooleanPath location: class QAccount C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:63: error: cannot find symbol public final BooleanPath notificationReplyOnMyPostByWeb = createBoolean("notificationReplyOnMyPostByWeb"); ^ symbol: class BooleanPath location: class QAccount C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:65: error: cannot find symbol public final BooleanPath notificationReplyOnMyReplyByEmail = createBoolean("notificationReplyOnMyReplyByEmail"); ^ symbol: class BooleanPath location: class QAccount C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:67: error: cannot find symbol public final BooleanPath notificationReplyOnMyReplyByWeb = createBoolean("notificationReplyOnMyReplyByWeb"); ^ symbol: class BooleanPath location: class QAccount C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:69: error: cannot find symbol public final StringPath occupation = createString("occupation"); ^ symbol: class StringPath location: class QAccount C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:71: error: cannot find symbol public final StringPath password = createString("password"); ^ symbol: class StringPath location: class QAccount C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:73: error: cannot find symbol public final StringPath profileImage = createString("profileImage"); ^ symbol: class StringPath location: class QAccount C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:75: error: cannot find symbol public final StringPath showPasswordUpdatePageToken = createString("showPasswordUpdatePageToken"); ^ symbol: class StringPath location: class QAccount C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:77: error: cannot find symbol public final StringPath userId = createString("userId"); ^ symbol: class StringPath location: class QAccount C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:79: error: cannot find symbol public final StringPath verifiedEmail = createString("verifiedEmail"); ^ symbol: class StringPath location: class QAccount C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:85: error: cannot find symbol public QAccount(Path<? extends Account> path) { ^ symbol: class Path location: class QAccount C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:85: error: cannot find symbol public QAccount(Path<? extends Account> path) { ^ symbol: class Account location: class QAccount C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:89: error: cannot find symbol public QAccount(PathMetadata metadata) { ^ symbol: class PathMetadata location: class QAccount C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\tag\QTag.java:22: error: cannot find symbol public final NumberPath<Long> id = createNumber("id", Long.class); ^ symbol: class NumberPath location: class QTag C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\tag\QTag.java:24: error: cannot find symbol public final StringPath title = createString("title"); ^ symbol: class StringPath location: class QTag C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\tag\QTag.java:30: error: cannot find symbol public QTag(Path<? extends Tag> path) { ^ symbol: class Path location: class QTag C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\tag\QTag.java:30: error: cannot find symbol public QTag(Path<? extends Tag> path) { ^ symbol: class Tag location: class QTag C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\tag\QTag.java:34: error: cannot find symbol public QTag(PathMetadata metadata) { ^ symbol: class PathMetadata location: class QTag C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\account\QAccount.java:5: error: package com.querydsl.core.types.dsl does not exist import com.querydsl.core.types.dsl.*; ^ C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\tag\QTag.java:5: error: package com.querydsl.core.types.dsl does not exist import com.querydsl.core.types.dsl.*; ^ C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\notification\QNotification.java:3: error: package com.querydsl.core.types does not exist import static com.querydsl.core.types.PathMetadataFactory.*; ^ C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\notification\QNotification.java:7: error: package com.querydsl.core.types does not exist import com.querydsl.core.types.PathMetadata; ^ C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\notification\QNotification.java:8: error: package javax.annotation does not exist import javax.annotation.Generated; ^ C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\notification\QNotification.java:9: error: package com.querydsl.core.types does not exist import com.querydsl.core.types.Path; ^ C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\notification\QNotification.java:10: error: package com.querydsl.core.types.dsl does not exist import com.querydsl.core.types.dsl.PathInits; ^ C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\notification\QNotification.java:17: error: cannot find symbol public class QNotification extends EntityPathBase<Notification> { ^ symbol: class EntityPathBase C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\notification\QNotification.java:16: error: cannot find symbol @Generated("com.querydsl.codegen.EntitySerializer") ^ symbol: class Generated C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\notification\QNotification.java:17: error: cannot find symbol public class QNotification extends EntityPathBase<Notification> { ^ symbol: class Notification C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\notification\QNotification.java:21: error: cannot find symbol private static final PathInits INITS = PathInits.DIRECT2; ^ symbol: class PathInits location: class QNotification C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\notification\QNotification.java:27: error: cannot find symbol public final SetPath<portfolio2.module.tag.Tag, portfolio2.module.tag.QTag> commonTag = this.<portfolio2.module.tag.Tag, portfolio2.module.tag.QTag>createSet("commonTag", portfolio2.module.tag.Tag.class, portfolio2.module.tag.QTag.class, PathInits.DIRECT2); ^ symbol: class SetPath location: class QNotification C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\notification\QNotification.java:27: error: cannot find symbol public final SetPath<portfolio2.module.tag.Tag, portfolio2.module.tag.QTag> commonTag = this.<portfolio2.module.tag.Tag, portfolio2.module.tag.QTag>createSet("commonTag", portfolio2.module.tag.Tag.class, portfolio2.module.tag.QTag.class, PathInits.DIRECT2); ^ symbol: class Tag location: package portfolio2.module.tag C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\notification\QNotification.java:29: error: cannot find symbol public final DateTimePath<java.time.LocalDateTime> createdDateTime = createDateTime("createdDateTime", java.time.LocalDateTime.class); ^ symbol: class DateTimePath location: class QNotification C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\notification\QNotification.java:31: error: cannot find symbol public final NumberPath<Long> id = createNumber("id", Long.class); ^ symbol: class NumberPath location: class QNotification C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\notification\QNotification.java:33: error: cannot find symbol public final BooleanPath isChecked = createBoolean("isChecked"); ^ symbol: class BooleanPath location: class QNotification C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\notification\QNotification.java:35: error: cannot find symbol public final StringPath link = createString("link"); ^ symbol: class StringPath location: class QNotification C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\notification\QNotification.java:37: error: cannot find symbol public final EnumPath<NotificationType> notificationType = createEnum("notificationType", NotificationType.class); ^ symbol: class EnumPath location: class QNotification C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\notification\QNotification.java:37: error: cannot find symbol public final EnumPath<NotificationType> notificationType = createEnum("notificationType", NotificationType.class); ^ symbol: class NotificationType location: class QNotification C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\notification\QNotification.java:39: error: cannot find symbol public final StringPath title = createString("title"); ^ symbol: class StringPath location: class QNotification C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\notification\QNotification.java:45: error: cannot find symbol public QNotification(Path<? extends Notification> path) { ^ symbol: class Path location: class QNotification C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\notification\QNotification.java:45: error: cannot find symbol public QNotification(Path<? extends Notification> path) { ^ symbol: class Notification location: class QNotification C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\notification\QNotification.java:49: error: cannot find symbol public QNotification(PathMetadata metadata) { ^ symbol: class PathMetadata location: class QNotification C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\notification\QNotification.java:53: error: cannot find symbol public QNotification(PathMetadata metadata, PathInits inits) { ^ symbol: class PathMetadata location: class QNotification C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\notification\QNotification.java:53: error: cannot find symbol public QNotification(PathMetadata metadata, PathInits inits) { ^ symbol: class PathInits location: class QNotification C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\notification\QNotification.java:57: error: cannot find symbol public QNotification(Class<? extends Notification> type, PathMetadata metadata, PathInits inits) { ^ symbol: class Notification location: class QNotification C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\notification\QNotification.java:57: error: cannot find symbol public QNotification(Class<? extends Notification> type, PathMetadata metadata, PathInits inits) { ^ symbol: class PathMetadata location: class QNotification C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\notification\QNotification.java:57: error: cannot find symbol public QNotification(Class<? extends Notification> type, PathMetadata metadata, PathInits inits) { ^ symbol: class PathInits location: class QNotification C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\notification\QNotification.java:5: error: package com.querydsl.core.types.dsl does not exist import com.querydsl.core.types.dsl.*; ^ C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\post\QPost.java:3: error: package com.querydsl.core.types does not exist import static com.querydsl.core.types.PathMetadataFactory.*; ^ C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\post\QPost.java:7: error: package com.querydsl.core.types does not exist import com.querydsl.core.types.PathMetadata; ^ C:\Users\shine\OneDrive\���� ȭ��\Programming\portfolio2\build\generated\querydsl\portfolio2\module\post\QPost.java:8: error: package javax.annotation does not exist import javax.annotation.Generated; ^ 100 errors FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':compileQuerydslJava'. > Compilation failed; see the compiler error output for details. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 20s Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/6.3/userguide/command_line_interface.html#sec:command_line_warnings 7 actionable tasks: 7 executed 오전 3:43:16: Tasks execution finished ':classes :testClasses :querydslClasses'. 구글링 결과, lombok때문이라는 말도 있고 해서 다 적용해보고, gradle 버전도 5버전대, 4버전대로 다운그레이드 해보고 다 해봤습니다. 우선, 김영한님의 querydsl 강의의 질문글 중에도 저와 같은 증상을 겪는 분들이 계시더라구요. 아래가 해당 질문글의 링크입니다. https://www.inflearn.com/questions/23530 영한님이 남겨주신 답변대로 해봤지만, 결과는 같았습니다. 또한, gradle 버전을 5버전대, 4버전대로 다운그레이드하여 아래의 포스팅대로 해봐도 결과는 같았습니다. https://jojoldu.tistory.com/372 그런데 이상한게, 어플리케이션 실행은 왜 계속 잘 될까요? 왜 이후 빌드만 실행하면 저런 에러가 날까요? 이것때문에 devtools live reload를 못쓰고 있네요ㅠ 모른다고 하셔도 괜찮습니다만.. 너무 답답해서 질문 남겨 봅니다..ㅠㅠ 감사합니다!
- 미해결스프링과 JPA 기반 웹 애플리케이션 개발
테스트 질문드립니다.
안녕하세요, 강의 잘 보고 있습니다. 다름이 아니라, 테스트 관련 질문입니다. 일단 모든 테스트를 돌렸을때, 모든 테스트가 통과합니다. 그런데, 통과된 테스트 콘솔을 보면 저런 에러 로그들이 남아있습니다. 각 테스트에서 h2 데이터베이스가 테이블을 drop할 때나, 테스트 시작 직전에 테이블을 create할 때 이미 해당 테이블들이 직전 테스트에서 만들어져 존재하므로, 만들 수 없다는 에러 같은데요, 신경 안 써도 되는건가요? 괜히 저런 에러가 남으니 찝찝해서요