일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
27 | 28 | 29 | 30 |
- mycp
- Linux
- junit
- BubbleSorting
- springboot
- decorator
- pscp
- 숫자야구
- Spring
- 쉬운 계단 수
- 데코레이터패턴
- setParameter
- 10951
- 전치행렬 #C
- 디자인패턴
- @ModelAttribute
- 백준
- gradle
- @Spring
- NamedParameterNotBound
- 자바
- 10844
- createQuery
- 여러인수
- C
- 자료구조
- @NotEmpty
- java
- 점세개
- designpattern
- Today
- Total
목록이것저것/오류 해결 (23)
...
스프링에서 h2 연결하고 테이블 생성할 때 자꾸 org.h2.jdbc.jdbcsqlsyntaxerrorexception 에러가 떴다. expeceted indentifier; 라는 오류문구가 계속 뜨길래 @id 문제인 줄 알고 계속 수정했는데 내가 사용한 클래스 이름이 문제였다... user... user가 db 예약어라서 안되었던 거였다............................................ 세시간동안 개고생했는데 =ㅜ.................................................................................................................. 예약어 예제 찾아보면서도 group, order 이런 건 예..

[ 확인해 보아야 할 것 ] 1. EntityManager가 final로 선언되어 있으며, em을 할당할 Constructor가 존재하는가? 2. RunWith(SpringRunner)가 선언되어 의존성 주입을 올바르게 받았는가? 3. Repository 앞에 @Autowired 어노테이션이 붙어있는가?

Gradle + Intellij 사용 후 애플리케이션을 실행시켰을 때 위와 같은 오류가 뜰 때가 있음 이와 같은 경우 File>Settings>Gradle로 가서 Build and run using 과 Run tests using 을 Gradle -> Intellij 로 변경해주면 해결된다.

@NotEmpty 어노테이션은 javax.validation.constraints 패키지에 존재한다. 스프링 부트 버전에 따라서 이 패키지가 포함되어있을 수도, 아닐 수도 있다. 따라서 @NotEmpty 어노테이션이 import되지 않을 때는 build.gradle dependencies에 implementation 'org.springframework.boot:spring-boot-starter-validation' 을 추가해준다.
//findByName public List findByName(String name){ return em.createQuery("select m from Member m where m.name = :name",Member.class) .setParameter("name",name) .getResultList(); } } createQuery를 할 때 setParameter를 제대로 지정해주지 않으면 발생하는 에러 까먹지말ㅣㅇ기

FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':test'. > No tests found for given includes: [jpabook.jpashop2.MemberServiceTest.ȸ ](filter.includeTestsMatching) --> File> Settings의 Run tests using을 Gradle에서 IntelliJ IDEA로 변경해주면 오류 해결
Error:java: error: release version 5 not supported 에러 발생 시 pom.xml에 org.apache.maven.plugins maven-compiler-plugin 11 11 추가하고 리팩토링 하면 문제 해결 ~~~!!!!

[90149-210] Generic H2 (Server) 로 변경하기 [2] jdbc:h2:tcp://localhost/~/test --> jdbc:h2:~/test 로 변경하기 **가장 처음엔 jdbc:h2:~/test 로 연결한 후, 정상적으로 연결되었다면 그 이후부터는 jdbc:h2:tcp://localhost/~/test 형태로 연결해서 사용해야 함.
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException 에러 발생 시 pom.xml에 javax.xml.bind jaxb-api 2.3.0 추가 하고 리팩토링 해주면 문제 해결 ~.~
package hello.core.order; import hello.core.AppConfig; import hello.core.member.Grade; import hello.core.member.Member; import hello.core.member.MemberService; import org.assertj.core.api.Assertions; import org.junit.Test; import org.junit.jupiter.api.BeforeEach; public class OrderServiceTest { MemberService memberService; OrderService orderService; @BeforeEach public void beforeEach(){ AppConfi..