자바

JAVA/오류해결

java.lang.SecurityException: class "org.hamcrest.Matchers"'s signer information does not match signer information of other classes in the same package

😢 오류 내용 java.lang.SecurityException: class "org.hamcrest.Matchers"'s signer information does not match signer information of other classes in the same package at java.lang.ClassLoader.checkCerts(Unknown Source) at java.lang.ClassLoader.preDefineClass(Unknown Source) at java.lang.ClassLoader.defineClassCond(Unknown Source) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.Secu..

JAVA/오류해결

[Spring Boot][오류해결] Executing an update/delete query

스프링 부트를 사용할 때 네이티브 쿼리를 통해 JPARepository를 다루는 경우가 있다. 그런데 아래와 같은 오류가 발생할 때가 있다. Resolved [org.springframework.dao.InvalidDataAccessApiUsageException: Executing an update/delete query; nested exception is javax.persistence.TransactionRequiredException: Executing an update/delete query] TransactionRequiredException이 발생한 것인데, update/delete 쿼리를 실행할 때 @Transactional을 붙여주지 않았기 때문에 발생한 에러이다. 문제의 코드 publ..

JAVA/오류해결

[Spring Boot][오류해결] Parameter 0 of constructor in ~~ required a bean of type ~~ that could not be found.

에러상황 *************************** APPLICATION FAILED TO START *************************** Description: Parameter 0 of constructor in com.bigbell.accountbook.rest.AccountRestController required a bean of type 'com.bigbell.accountbook.service.TodayAccountService' that could not be found. Action: Consider defining a bean of type 'com.bigbell.accountbook.service.TodayAccountService' in your configura..

JAVA/오류해결

[Spring Boot][오류해결] Parameter 0 of constructor in ~~ required a single bean, but 2 were found

Description: Parameter 0 of constructor in com.bigbell.springboot.cruddemo.service.EmployeeServiceImpl required a single bean, but 2 were found: - employeeDAOHibernateImpl: defined in file [D:\bigbell\Spring-Boot\22-jpa-crud- demo\target\classes\com\bigbell\springboot\cruddemo\dao\EmployeeDAOHibernateImpl.class] - employeeDAOJpaImpl: defined in file [D:\bigbell\Spring-Boot\22-jpa-crud- demo\targ..

JAVA/오류해결

[Spring Boot][오류해결] org.springframework.beans.factory.UnsatisfiedDependencyException

org.springframework.beans.factory.UnsatisfiedDependencyException Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException 스프링부트를 사용하다가 위와 같은 에러가 발생하는 경우가 있다. 특정 인터페이스를 상속한 클래스 파일이 여러 개일 때 의존성 주입을 위해 @Qualifier 어노테이션을 사용하게 되는데, 이 때 실수를 하면 발생하는 에러다. 아래와 같은 DAO 파일과 Service 파일 있다고 해보자. (전제 >>> DAO 인터페이스를 상속..

Spring/Spring Boot

[Spring Boot] 스프링부트 시작하기!

스프링 프레임워크는 설정할 것도 굉장히 많고 복잡하기 때문에 작업 초기에 설정하느라 시간이 많이 소요되는 편이다. 메이븐이나 그래들을 이용해 필요한 의존성을 직접 찾아서 추가해줘야했다. 반면, 스프링부트는 스타터를 사용해 특정 기능에 필요한 의존성을 손쉽게 처리할 수 있도록 도와준다. 그렇게 처리된 라이브러리들을 통해 스프링 설정을 자동으로 해주기 때문에 시간 면에서 훨씬 이득이다. 그렇다면 스프링부트를 이용하는 방법에 대해서 알아보자. 1. 홈페이지에서 파일 생성하기 스프링부트 파일 생성하기 👇👇👇👇👇👇 https://start.spring.io/ 홈페이지에 접속해보자. 만약 메이븐, 자바를 사용한다면 초기값으로 나둬도 괜찮다. 빨간 박스를 표시한 곳을 위주로 자신의 상황에 맞게 설정해주면 된다. Gr..

gakko
'자바' 태그의 글 목록