본문 바로가기

error

(6)
[error] 식에 정수 또는 범위가 지정되지 않은 열거형 형식이 있어야 합니다. 아래와 같은 코드를 작성하였는데 에러가 발생하였다. int func3(int N){ if(sqrt(N) % 1 == 0) 에레메세지 식에 정수 또는 범위가 지정되지 않은 열거형 형식이 있어야 합니다. sqrt 연산은 double형을 반환하는데 모듈러 연산은 정수형에 대해서만 수행이 가능하기 때문에 에러가 발생하였다.
[Springboot-error] @Transactional(readOnly = true) 옵션 못 찾음 에러 내용 @Transactional(readOnly = true) 여기서 readOnly 옵션을 못 찾음. 해결 방법 Transactional 어노테이션 import 할 때 import javax.transaction.Transactional; 위 코드 대신에 아래 코드로 바꾸면 해결된다. (위 코드는 옵션을 허용하지 않고 아래 코드는 옵션을 허용한다. 어노테이션 기능은 똑같다.) import org.springframework.transaction.annotation.Transactional;
[Springboot-error] 테스트코드 에러 등록, 수정 api 작성하고 테스트코드 돌리는데 다음과 같은 에러가 났다. 에러 메시지 org.springframework.web.client.RestClientException: Error while extracting response for type [class java.lang.Long] and content type [application/json;charset=UTF-8]; nested exception is org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot deserialize instance of `java.lang.Long` out of START_OBJECT token; n..
[Springboot] org.junit.ComparisonFailure: 401 에러 에러메세지 org.junit.ComparisonFailure: Expected :200 OK Actual :401 UNAUTHORIZED at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:64) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl...
[Springboot-error] 테스트코드 401에러 테스트코드 작성하고 실행했는데 다음과 같은 에러가 발생했다. 에러 내용 java.lang.AssertionError: Status Expected :200 Actual :401 at org.springframework.test.util.AssertionErrors.fail(AssertionErrors.java:59) at org.springframework.test.util.AssertionErrors.assertEquals(AssertionErrors.java:98) at org.springframework.test.web.servlet.result.StatusResultMatchers.lambda$matcher$9(StatusResultMatchers.java:619) at org.springfram..
[IntelliJ-error] No tests found for given includes: 에러내용 Execution failed for task ':test'. > No tests found for given includes: [com.eunyeong.book.springboot.HelloControllerTest.hello��_���ϵȴ�](--tests filter) Run tests using: IntelliJ IDEA로 변경하면 해결된다.