묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결
강의 관련 연계 프로그램 지원 여부
안녕하세요 전주정보문화산업진흥원 김영찬입니다.전라북도 지역 개발자 대상으로 교육을 지원하고 싶은데요.혹시 연계프로그램 같은 것을 지원 가능한지 질문드립니다.2023년 교육 비용을 사전 결제 (또는 년단위 또는 월단위 결제)를 저희가 하고전라북도 지역 개발자가 듣고 싶은 강의를 듣게 하고,수료증은 저희도 다운로드 가능해서1년에 수료 현황을 파악할 수 있어야 함. 이런 정책이 가능한지 답변 부탁드립니다.감사합니다.
-
미해결재고시스템으로 알아보는 동시성이슈 해결방법
동시성 제어 이슈
package org.example; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.SQLException; class Test implements Runnable { private Connection conn; Test(Connection conn) { this.conn = conn; } @Override public void run() { try(PreparedStatement pstmt = conn.prepareStatement("UPDATE stock SET quantity = quantity + 1 WHERE id = 1")) { pstmt.executeUpdate(); } catch (SQLException e) { System.out.println("error"); } } } public class Main { private static String address = "localhost"; private static String port = "3306"; private static String databaseName = "stock_example"; private static String tableName = "stock"; private static String user = "root"; private static String password = "1234"; private static String url = "jdbc:mysql://" + address + ":" + port + "/" + databaseName; public static void main(String args[]) { Connection[] conn = new Connection[100]; Thread[] thread = new Thread[100]; for ( int i = 0 ; i < 100 ; i++ ) { try { conn[i] = DriverManager.getConnection(url, user, password); thread[i] = new Thread(new Test(conn[i])); } catch (SQLException e) { System.out.println(e.getMessage()); } } for ( int i = 0 ; i < 100 ; i++ ) { thread[i].start(); } } } 본 강의를 수강한 이후에 isolation level에 대해서 학습을 하면서 mysql은 기본적으로 repeatable read를 적용하고 있다는 것을 보았습니다.그렇다면 따로 설정을 해주지 않더라도 동시성 문제가 해결되는 것은 아닌가 생각이 들어 위와 같은 코드를 통해서 테스틀 해보았습니다. 테스트 환경은 spring을 따로 사용하지 않았으면 gradle에 jdbc 의존성만 추가 해주고 진행하였습니다.위의 코드에서 각각의 쓰레드가 stock의 수량에 대해서 1씩 증가하려는 코드이고 코드 실행 후 db에 수량을 확인하여 100개로 잘 나타는것을 확인하였습니다.이 경우에는 왜 강의에서 진행하는 테스트와 달리 db의 무결성이 지켜지지 않는 문제가 발생하지 않는건가요? 또한 mysql은 repeatable read를 채택하고 있다면 왜 강의에서 이용한 테스트코드는 무결성이 지켜지지 않는건가요?
-
해결됨디자인 시스템 with 피그마
다른 파일에 피그마토큰 연동하기
안녕하세요 범쌤!파운데이션이나 컴포넌트를 모아두는 파일과 실제 화면이 있는 파일을 구분해서 사용중입니다.그동안은 라이브러리기능을 이용하고 있었구요.figma token 플러그인에 더 많은 항목을 셋팅할 수 있어서(spacing 등등) 너무 유용한데, 혹시 이걸 실제 화면을 작성하는 파일에는 어떻게 연동해야할까요?이후에 업데이트도요.늘 감사합니다. 많이 배우고있어요~
-
미해결[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)
코드를 어디서 구할 수 있는지 궁금합니다.
좋은 강의 해주셔서 감사합니다. 강의를 다 듣고 프로젝트를 만들었는데 처음에 보여준 홈화면 커뮤니티 연동과 마이페이지 같은 기능도 추가하고 싶어서 혹시 완성된 소스코드는 어디서 볼 수 있는지 여쭤볼 수 있을까요?
-
미해결[리뉴얼] 타입스크립트 올인원 : Part1. 기본 문법편
제네릭에서 질문입니다.
function add<T extends (a: string) => number>(x: T): T { return x }; add((a)=>+a)위 코드 add((a)=>+a) 에서 인자 a가 왜 string으로 인식되는지 , +a가 왜 숫자로 인식되는지 이해가 가지 않습니다.
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)
docker-compose up 에러
이렇게 작성 후 .env 설정하고 나서 docker-compose up 진행하니깐 (root) Additional property -version is not allowed에러가 계속 발생되더라구요. 처음에 postgres 잘 생성되다가 다시 포맷하고 docker 설치하고 난 이후에 똑같은 코드로 진행했는데도 에러가 발생이 됩니다.
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
Attempted import error: 'loginAction' is not exported from '../reducers/user'. 에러
Redux 연동하기 - 리듀소 쪼개기 ( 6분 27초 )강의 진행도중 Attempted import error: 'loginAction' is not exported from '../reducers'. 에러가 떠서'../reducers' -> '../reducers/user' 변경을 했지만 똑같은 에러가 떠서 질문드립니다강의도 여러번 돌려보고 구글링을 해도 해답을 못찾겠네요 해결방법좀 부탁드립니다
-
미해결10주완성 C++ 코딩테스트 | 알고리즘 코딩테스트
3주차 이론 강의 중 코드 질문드립니다.
주사위 윷놀이의 move로직을 bfs로 구현한 이유는 무엇인가요?소스코드: http://boj.kr/8ad62ffaf4014598a74c9c44130e49a9bfs 대신 그냥 here을 갱신만 해줘도 되더라구요.
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
UnsatisfiedDependencyException 오류
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)예2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)예3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)예[질문 내용]교안에 올라와 있는 대로 스프링 설정 변경을 진행했는데, 막상 실행을 시켜보니 각종 에러가 나와 질의 드립니다.첫 번째 질문 후 https://www.inflearn.com/questions/674179 링크를 참고하라는 답변을 받았는데요, runtimeOnley 'com.h2database:h2` 코드는 이미 입력되어있었고인텔리제이 우측 Gradle란에서 Reload all gradle projects도 실행해 보았고, 파일을 다 종료한 뒤 build.gradle 파일을 프로젝트로 여는 것도 시도해 보았지만 여전히 같은 오류가 반복됩니다ㅠbulid.gradle 파일 사진 새로 첨부하도록 하겠습니다bulid.gradle 파일 사진 첨부 SpringConfig파일 코드 첨부2. 에러 사진 첨부3. 에러 코드 첨부org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'springConfig' defined in file [C:\Spring-project\hello-Spring\out\production\classes\hello\helloSpring\SpringConfig.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.h2.driver at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800) ~[spring-beans-5.3.23.jar:5.3.23] at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:229) ~[spring-beans-5.3.23.jar:5.3.23] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372) ~[spring-beans-5.3.23.jar:5.3.23] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222) ~[spring-beans-5.3.23.jar:5.3.23] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.3.23.jar:5.3.23] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.23.jar:5.3.23] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.23.jar:5.3.23] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.23.jar:5.3.23] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.23.jar:5.3.23] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.23.jar:5.3.23] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955) ~[spring-beans-5.3.23.jar:5.3.23] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) ~[spring-context-5.3.23.jar:5.3.23] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.23.jar:5.3.23] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147) ~[spring-boot-2.7.4.jar:2.7.4] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:734) ~[spring-boot-2.7.4.jar:2.7.4] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408) ~[spring-boot-2.7.4.jar:2.7.4] at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) ~[spring-boot-2.7.4.jar:2.7.4] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306) ~[spring-boot-2.7.4.jar:2.7.4] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295) ~[spring-boot-2.7.4.jar:2.7.4] at hello.helloSpring.HelloSpringApplication.main(HelloSpringApplication.java:10) ~[classes/:na] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.h2.driver at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658) ~[spring-beans-5.3.23.jar:5.3.23] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638) ~[spring-beans-5.3.23.jar:5.3.23] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352) ~[spring-beans-5.3.23.jar:5.3.23] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195) ~[spring-beans-5.3.23.jar:5.3.23] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.3.23.jar:5.3.23] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.23.jar:5.3.23] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.23.jar:5.3.23] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.23.jar:5.3.23] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.23.jar:5.3.23] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.23.jar:5.3.23] at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.3.23.jar:5.3.23] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391) ~[spring-beans-5.3.23.jar:5.3.23] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311) ~[spring-beans-5.3.23.jar:5.3.23] at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887) ~[spring-beans-5.3.23.jar:5.3.23] at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791) ~[spring-beans-5.3.23.jar:5.3.23] ... 19 common frames omitted Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.h2.driver at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.3.23.jar:5.3.23] at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653) ~[spring-beans-5.3.23.jar:5.3.23] ... 33 common frames omitted Caused by: java.lang.IllegalStateException: Cannot load driver class: org.h2.driver at org.springframework.util.Assert.state(Assert.java:97) ~[spring-core-5.3.23.jar:5.3.23] at org.springframework.boot.autoconfigure.jdbc.DataSourceProperties.determineDriverClassName(DataSourceProperties.java:171) ~[spring-boot-autoconfigure-2.7.4.jar:2.7.4] at org.springframework.boot.autoconfigure.jdbc.DataSourceProperties.initializeDataSourceBuilder(DataSourceProperties.java:123) ~[spring-boot-autoconfigure-2.7.4.jar:2.7.4] at org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration.createDataSource(DataSourceConfiguration.java:48) ~[spring-boot-autoconfigure-2.7.4.jar:2.7.4] at org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration$Hikari.dataSource(DataSourceConfiguration.java:90) ~[spring-boot-autoconfigure-2.7.4.jar:2.7.4] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na] at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na] at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.3.23.jar:5.3.23] ... 34 common frames omitted
-
미해결Vue.js 완벽 가이드 - 실습과 리팩토링으로 배우는 실전 개념
이벤트 버스에서 메소드 실행시 안되고, 속성을 바로 변경시만 적용이 됩니다.
#예시처럼 메소드에 startSpinner로 만들시에 이벤트가 발생이 안됨 bus.$on('start:spinner', () => this.startSpinner ); #아래와 같이 data에 속성을 바로 제어시에만 동작이 제대로 됩니다. bus.$on('start:spinner', () => this.loadingStatus = true ) 이유가 뭘까요?
-
미해결
혹시 애플 디벨로퍼 강의 중 이 사이트를 교재로 하는 강의가 있을까요?
Building Lists and Navigation — SwiftUI Tutorials | Apple Developer Documentation이 강의를 공부하고 싶은데 이 강좌가 있나해서요
-
미해결[리뉴얼] 타입스크립트 올인원 : Part1. 기본 문법편
interface에 readonly 속성이 있을 때
interface A { readonly a: string; b: string; } class B implements A { a: string = '123'; // OK b: string = 'world'; } const b: B = new B(); b.a = '456'; // OK console.log(b); // { a: '456', b: 'world' } 인터페이스 A에서 변수 a는 readonly 키워드가 붙어있는데 이를 구현한 클래스 B에서 readonly 키워드를 붙여주지 않아도 에러가 발생하지 않는 이유가 궁금합니다.
-
미해결딥러닝 CNN 완벽 가이드 - TFKeras 버전
Xception 같은 경우 동결은 어떻게 해야될까요?
Xception 모델 같은 경우 어디 layer 까지 trainable를 False로 지정해야 될까요?
-
해결됨홍정모의 따라하며 배우는 C++
Derivec class -> Base class 형변환
안녕하세요! Derived 객체에서 Base class로의 형변환 과정이 궁금해져서 질문을 남깁니다!참고로 VS2022 를 사용하였습니다.#include <iostream> using namespace std; class Base { protected: int m_i; public: Base(int value) : m_i(value) { cout << sizeof(*this) << endl; } friend std::ostream& operator << (std::ostream& out, const Base& b) { out << &b << endl; out << "This is base output" << endl; return out; } }; class Derived : public Base { private: double m_d; public: Derived(int value) : Base(value) {} friend std::ostream& operator << (std::ostream& out, const Derived& d) { // derived는 base의 memory를 갖고 있기 때문에 가능함. out << static_cast<Base>(d); out << "This is derived output" << endl; return out; } }; int main() { Derived derived(7); cout << &derived << endl; cout << sizeof(derived) << endl; cout << derived << endl; return 0; } 먼저 class가 차지하는 size를 sizeof로 확인한 결과 Base는 4bytes, Derived는 16bytes(padding)으로 나왔습니다.그다음 디버거를 통해 Derived의 주소를 통해 메모리에 들어있는 값을 확인한 후 Base의 연산자 오버로딩으로 넘어간 static_cast<Base> (d)의 주소를 들어가봤습니다.(위에 빨간 줄이 Base << 로 넘어간 후 static_cast<Base> (d)의메모리, 아래는 derived의 메모리)결과 base << 는 reference로 받기 때문에 원본을 받아야하는데 주소가 다르게 나오고 값이 복사된 것을 확인할 수 있었습니다. 이 과정에서 어떤 부분이 복사하도록 관여한 것일까요?한 가지 추측으로는 static_cast<>가 내부적으로 복사한 값을 base의 <<로 보내는 것이 아닌가 생각합니다!
-
해결됨Flutter 앱 개발 기초
Flutter 설치 중 Rosetta 설치 관련 문의
안녕하세요. 선생님의 플러터 설치 가이드를 따라보며, 플러터를 새로 설치하였습니다.맥북에어 m1 환경에서 설치하였는데, xcode설치 시, resetta라는 것을 설치하였습니다. 가이드에는 없는 내용이라 그러한데, rosetta가 무엇이고 이것을 설치해도 되는지요?
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
next-redux-wrapper
제로초님 제가 next-redux-wrapper를 사용했는데 사용이후 새로고침을 할때마다 밑에처럼 4번씩 이나 찍히는데 이게 원래 4번이 맞는걸까요?
-
미해결카프카 완벽 가이드 - 코어편
카프카와 주키퍼랑 통신할때는 브로커 서버의 어느 컴포넌트를 사용해 통신하나요?
카프카와 주키퍼랑 통신할때는 브로커 서버의 어느 컴포넌트를 사용해 통신하나요?컨수머는 컨수머 그룹 코디네이터와 통신하고,, 파티션은 파티션 리더와 통신하는데, >> 질문 : 브로커 서버( 카프카 서버) 와 주키퍼는 어느 컴포넌트를 통해서 통신하나요? 머신러닝때부터 감사합니다 하하... 많이 배우고 있습니다.
-
미해결스프링 핵심 원리 - 기본편
AppConfig의 전체 동작방식 구성 의미
[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예)[질문 내용]AppConfig가 애플리케이션의 동작에 필요한 구현객체를 생성하고, 연결하는 별도의 설정 클래스라는것은 이해했는데,강의 내용 보면 AppConfig가 애플리케이션의 전체 동작방식을 구성한다고 하였는데 여기서 말씀하시는 '애플리케이션의 전체 동작방식 구성' 이라는 의미가 무엇인지 모르겠어서요.애플리케이션의 전체 동작방식 구성 = 애플리케이션의 동작에 필요한 구현객체생성, 연결 이렇게 이해하면될까요?
-
미해결[개념은 호옹~, 실습 빡] 스프링 부트, 입문!
21강 질문
나머지는 다 되는데 Create 성공 test만 에러가 나네요. 코드도 다 똑같이 했는데, 이유를 잘 모르겠습니다. SQL Error: 23505, SQLState: 23505 라는 에러코드가 있어 확인해봤더니 이미 같은값이 존재할때 이런 메세지가 뜬다는데.. 그래서 4L을 다른 숫자로도 바꿔보고 타이틀이나 컨텐트를 다른 문자로도 바꿔봤는데 결과가 똑같네요. 도움 부탁드리겠습니다. > Task :compileJava UP-TO-DATE> Task :processResources UP-TO-DATE> Task :classes UP-TO-DATE> Task :compileTestJava> Task :processTestResources NO-SOURCE> Task :testClasses> Task :test11:12:22.291 [Test worker] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating CacheAwareContextLoaderDelegate from class [org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate]11:12:22.302 [Test worker] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating BootstrapContext using constructor [public org.springframework.test.context.support.DefaultBootstrapContext(java.lang.Class,org.springframework.test.context.CacheAwareContextLoaderDelegate)]11:12:22.336 [Test worker] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating TestContextBootstrapper for test class [com.example.firstproject.Service.ArticleServiceTest] from class [org.springframework.boot.test.context.SpringBootTestContextBootstrapper]11:12:22.349 [Test worker] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Neither @ContextConfiguration nor @ContextHierarchy found for test class [com.example.firstproject.Service.ArticleServiceTest], using SpringBootContextLoader11:12:22.353 [Test worker] DEBUG org.springframework.test.context.support.AbstractContextLoader - Did not detect default resource location for test class [com.example.firstproject.Service.ArticleServiceTest]: class path resource [com/example/firstproject/Service/ArticleServiceTest-context.xml] does not exist11:12:22.354 [Test worker] DEBUG org.springframework.test.context.support.AbstractContextLoader - Did not detect default resource location for test class [com.example.firstproject.Service.ArticleServiceTest]: class path resource [com/example/firstproject/Service/ArticleServiceTestContext.groovy] does not exist11:12:22.354 [Test worker] INFO org.springframework.test.context.support.AbstractContextLoader - Could not detect default resource locations for test class [com.example.firstproject.Service.ArticleServiceTest]: no resource found for suffixes {-context.xml, Context.groovy}.11:12:22.355 [Test worker] INFO org.springframework.test.context.support.AnnotationConfigContextLoaderUtils - Could not detect default configuration classes for test class [com.example.firstproject.Service.ArticleServiceTest]: ArticleServiceTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration.11:12:22.409 [Test worker] DEBUG org.springframework.test.context.support.ActiveProfilesUtils - Could not find an 'annotation declaring class' for annotation type [org.springframework.test.context.ActiveProfiles] and class [com.example.firstproject.Service.ArticleServiceTest]11:12:22.470 [Test worker] DEBUG org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider - Identified candidate component class: file [C:\Users\jine\Desktop\firstproject\build\classes\java\main\com\example\firstproject\FirstprojectApplication.class]11:12:22.471 [Test worker] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Found @SpringBootConfiguration com.example.firstproject.FirstprojectApplication for test class com.example.firstproject.Service.ArticleServiceTest11:12:22.573 [Test worker] DEBUG org.springframework.boot.test.context.SpringBootTestContextBootstrapper - @TestExecutionListeners is not present for class [com.example.firstproject.Service.ArticleServiceTest]: using defaults.11:12:22.573 [Test worker] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Loaded default TestExecutionListener class names from location [META-INF/spring.factories]: [org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener, org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestExecutionListener, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestExecutionListener, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListener, org.springframework.boot.test.autoconfigure.webservices.client.MockWebServiceServerTestExecutionListener, org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener, org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener, org.springframework.test.context.web.ServletTestExecutionListener, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener, org.springframework.test.context.event.ApplicationEventsTestExecutionListener, org.springframework.test.context.support.DependencyInjectionTestExecutionListener, org.springframework.test.context.support.DirtiesContextTestExecutionListener, org.springframework.test.context.transaction.TransactionalTestExecutionListener, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener, org.springframework.test.context.event.EventPublishingTestExecutionListener]11:12:22.593 [Test worker] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Using TestExecutionListeners: [org.springframework.test.context.web.ServletTestExecutionListener@6d025197, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener@27d4a09, org.springframework.test.context.event.ApplicationEventsTestExecutionListener@7e4204e2, org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener@b7c4869, org.springframework.boot.test.autoconfigure.SpringBootDependencyInjectionTestExecutionListener@740d2e78, org.springframework.test.context.support.DirtiesContextTestExecutionListener@1c481ff2, org.springframework.test.context.transaction.TransactionalTestExecutionListener@72437d8d, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener@1b955cac, org.springframework.test.context.event.EventPublishingTestExecutionListener@676cf48, org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener@5a1de7fb, org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestExecutionListener@335b5620, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestExecutionListener@29a0cdb, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListener@32a68f4f, org.springframework.boot.test.autoconfigure.webservices.client.MockWebServiceServerTestExecutionListener@73194df, org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener@6eb2384f]11:12:22.596 [Test worker] DEBUG org.springframework.test.context.support.AbstractDirtiesContextTestExecutionListener - Before test class: context [DefaultTestContext@30af5b6b testClass = ArticleServiceTest, testInstance = [null], testMethod = [null], testException = [null], mergedContextConfiguration = [WebMergedContextConfiguration@19835e64 testClass = ArticleServiceTest, locations = '{}', classes = '{class com.example.firstproject.FirstprojectApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.autoconfigure.actuate.metrics.MetricsExportContextCustomizerFactory$DisableMetricExportContextCustomizer@35841320, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@6b695b06, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@6f01b95f, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@7a5ceedd, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@26abb146, org.springframework.boot.test.context.SpringBootTestArgs@1, org.springframework.boot.test.context.SpringBootTestWebEnvironment@96def03], resourceBasePath = 'src/main/webapp', contextLoader = 'org.springframework.boot.test.context.SpringBootContextLoader', parent = [null]], attributes = map['org.springframework.test.context.web.ServletTestExecutionListener.activateListener' -> true]], class annotated with @DirtiesContext [false] with mode [null]. . ____ _ /\\ / ___'_ __ (_)_ _ \ \ \ \( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v2.7.4)2022-10-18 11:12:22.915 INFO 3660 --- [ Test worker] c.e.f.Service.ArticleServiceTest : Starting ArticleServiceTest using Java 1.8.0_345 on Home with PID 3660 (started by jine in C:\Users\jine\Desktop\firstproject)2022-10-18 11:12:22.916 INFO 3660 --- [ Test worker] c.e.f.Service.ArticleServiceTest : No active profile set, falling back to 1 default profile: "default"2022-10-18 11:12:23.475 INFO 3660 --- [ Test worker] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.2022-10-18 11:12:23.527 INFO 3660 --- [ Test worker] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 43 ms. Found 1 JPA repository interfaces.2022-10-18 11:12:24.037 INFO 3660 --- [ Test worker] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...2022-10-18 11:12:24.283 INFO 3660 --- [ Test worker] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.2022-10-18 11:12:24.349 INFO 3660 --- [ Test worker] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]2022-10-18 11:12:24.413 INFO 3660 --- [ Test worker] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.6.11.Final2022-10-18 11:12:24.611 INFO 3660 --- [ Test worker] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}2022-10-18 11:12:24.774 INFO 3660 --- [ Test worker] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect2022-10-18 11:12:25.369 DEBUG 3660 --- [ Test worker] org.hibernate.SQL : drop table if exists article CASCADE 2022-10-18 11:12:25.376 DEBUG 3660 --- [ Test worker] org.hibernate.SQL : create table article ( id bigint generated by default as identity, content varchar(255), title varchar(255), primary key (id) )2022-10-18 11:12:25.385 INFO 3660 --- [ Test worker] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]2022-10-18 11:12:25.395 INFO 3660 --- [ Test worker] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'2022-10-18 11:12:25.896 WARN 3660 --- [ Test worker] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning2022-10-18 11:12:26.318 INFO 3660 --- [ Test worker] o.s.b.a.h2.H2ConsoleAutoConfiguration : H2 console available at '/h2-console'. Database available at 'jdbc:h2:mem:testdb'2022-10-18 11:12:26.699 INFO 3660 --- [ Test worker] c.e.f.Service.ArticleServiceTest : Started ArticleServiceTest in 4.067 seconds (JVM running for 5.345)2022-10-18 11:12:26.843 DEBUG 3660 --- [ Test worker] org.hibernate.SQL : insert into article (id, content, title) values (default, ?, ?)2022-10-18 11:12:26.849 TRACE 3660 --- [ Test worker] o.h.type.descriptor.sql.BasicBinder : binding parameter [1] as [VARCHAR] - [4444]2022-10-18 11:12:26.850 TRACE 3660 --- [ Test worker] o.h.type.descriptor.sql.BasicBinder : binding parameter [2] as [VARCHAR] - [라라라라]2022-10-18 11:12:26.853 WARN 3660 --- [ Test worker] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 23505, SQLState: 235052022-10-18 11:12:26.854 ERROR 3660 --- [ Test worker] o.h.engine.jdbc.spi.SqlExceptionHelper : Unique index or primary key violation: "PRIMARY KEY ON PUBLIC.ARTICLE(ID) ( /* key:1 */ CAST(1 AS BIGINT), '1111', U&'\\ac00\\ac00\\ac00\\ac00')"; SQL statement:insert into article (id, content, title) values (default, ?, ?) [23505-214]could not execute statement; SQL [n/a]; constraint ["PRIMARY KEY ON PUBLIC.ARTICLE(ID) ( /* key:1 */ CAST(1 AS BIGINT), '1111', U&'\\ac00\\ac00\\ac00\\ac00')"; SQL statement:insert into article (id, content, title) values (default, ?, ?) [23505-214]]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statementorg.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; constraint ["PRIMARY KEY ON PUBLIC.ARTICLE(ID) ( /* key:1 */ CAST(1 AS BIGINT), '1111', U&'\\ac00\\ac00\\ac00\\ac00')"; SQL statement:insert into article (id, content, title) values (default, ?, ?) [23505-214]]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:276) at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:233) at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:551) at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:61) at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:242) at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:152) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:174) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215) at com.sun.proxy.$Proxy105.save(Unknown Source) at com.example.firstproject.Service.ArticleService.create(ArticleService.java:37) at com.example.firstproject.Service.ArticleService$$FastClassBySpringCGLIB$$ee1232c.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy.invokeMethod(CglibAopProxy.java:386) at org.springframework.aop.framework.CglibAopProxy.access$000(CglibAopProxy.java:85) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:704) at com.example.firstproject.Service.ArticleService$$EnhancerBySpringCGLIB$$1500e2b6.create(<generated>) at com.example.firstproject.Service.ArticleServiceTest.create_성공____title과_content만_있는_dto_입력(ArticleServiceTest.java:70) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:725) at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60) at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131) at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149) at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140) at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84) at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115) 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:98) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:214) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:210) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:135) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:66) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at java.util.ArrayList.forEach(ArrayList.java:1259) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at java.util.ArrayList.forEach(ArrayList.java:1259) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35) at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86) at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86) at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53) at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.processAllTestClasses(JUnitPlatformTestClassProcessor.java:99) at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.access$000(JUnitPlatformTestClassProcessor.java:79) at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.stop(JUnitPlatformTestClassProcessor.java:75) at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:61) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36) at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33) at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94) at com.sun.proxy.$Proxy2.stop(Unknown Source) at org.gradle.api.internal.tasks.testing.worker.TestWorker$3.run(TestWorker.java:193) at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:129) at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:100) at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:60) at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56) at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:133) at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:71) at worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69) at worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74)Caused by: org.hibernate.exception.ConstraintViolationException: could not execute statement at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:37) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:113) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:99) at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:200) at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:58) at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:43) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3279) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3885) at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:84) at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:645) at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:282) at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:263) at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:317) at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:330) at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:287) at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:193) at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:123) at org.hibernate.event.internal.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:185) at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:128) at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:55) at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:107) at org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:756) at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:742) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:311) at com.sun.proxy.$Proxy102.persist(Unknown Source) at org.springframework.data.jpa.repository.support.SimpleJpaRepository.save(SimpleJpaRepository.java:666) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.data.repository.core.support.RepositoryMethodInvoker$RepositoryFragmentMethodInvoker.lambda$new$0(RepositoryMethodInvoker.java:289) at org.springframework.data.repository.core.support.RepositoryMethodInvoker.doInvoke(RepositoryMethodInvoker.java:137) at org.springframework.data.repository.core.support.RepositoryMethodInvoker.invoke(RepositoryMethodInvoker.java:121) at org.springframework.data.repository.core.support.RepositoryComposition$RepositoryFragments.invoke(RepositoryComposition.java:530) at org.springframework.data.repository.core.support.RepositoryComposition.invoke(RepositoryComposition.java:286) at org.springframework.data.repository.core.support.RepositoryFactorySupport$ImplementationMethodExecutionInterceptor.invoke(RepositoryFactorySupport.java:640) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.doInvoke(QueryExecutorMethodInterceptor.java:164) at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.invoke(QueryExecutorMethodInterceptor.java:139) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:137) ... 100 moreCaused by: org.h2.jdbc.JdbcSQLIntegrityConstraintViolationException: Unique index or primary key violation: "PRIMARY KEY ON PUBLIC.ARTICLE(ID) ( /* key:1 */ CAST(1 AS BIGINT), '1111', U&'\\ac00\\ac00\\ac00\\ac00')"; SQL statement:insert into article (id, content, title) values (default, ?, ?) [23505-214] at org.h2.message.DbException.getJdbcSQLException(DbException.java:508) at org.h2.message.DbException.getJdbcSQLException(DbException.java:477) at org.h2.message.DbException.get(DbException.java:223) at org.h2.message.DbException.get(DbException.java:199) at org.h2.mvstore.db.MVPrimaryIndex.add(MVPrimaryIndex.java:120) at org.h2.mvstore.db.MVTable.addRow(MVTable.java:519) at org.h2.command.dml.Insert.insertRows(Insert.java:174) at org.h2.command.dml.Insert.update(Insert.java:135) at org.h2.command.CommandContainer.executeUpdateWithGeneratedKeys(CommandContainer.java:242) at org.h2.command.CommandContainer.update(CommandContainer.java:163) at org.h2.command.Command.executeUpdate(Command.java:252) at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:209) at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:169) at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61) at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java) at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:197) ... 145 moreArticleServiceTest > create_성공____title과_content만_있는_dto_입력() FAILED org.springframework.dao.DataIntegrityViolationException at ArticleServiceTest.java:70 Caused by: org.hibernate.exception.ConstraintViolationException at ArticleServiceTest.java:70 Caused by: org.h2.jdbc.JdbcSQLIntegrityConstraintViolationException at ArticleServiceTest.java:702022-10-18 11:12:26.926 INFO 3660 --- [ionShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'2022-10-18 11:12:26.926 INFO 3660 --- [ionShutdownHook] .SchemaDropperImpl$DelayedDropActionImpl : HHH000477: Starting delayed evictData of schema as part of SessionFactory shut-down'2022-10-18 11:12:26.927 DEBUG 3660 --- [ionShutdownHook] org.hibernate.SQL : drop table if exists article CASCADE 2022-10-18 11:12:26.927 WARN 3660 --- [ionShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 90121, SQLState: 901212022-10-18 11:12:26.927 ERROR 3660 --- [ionShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-214]2022-10-18 11:12:26.928 WARN 3660 --- [ionShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 90121, SQLState: 901212022-10-18 11:12:26.928 ERROR 3660 --- [ionShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-214]2022-10-18 11:12:26.928 WARN 3660 --- [ionShutdownHook] o.s.b.f.support.DisposableBeanAdapter : Invocation of destroy method failed on bean with name 'entityManagerFactory': org.hibernate.exception.JDBCConnectionException: Unable to release JDBC Connection used for DDL execution2022-10-18 11:12:26.928 INFO 3660 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...2022-10-18 11:12:26.929 INFO 3660 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.1 test completed, 1 failed> Task :test FAILEDFAILURE: Build failed with an exception.* What went wrong:Execution failed for task ':test'.> There were failing tests. See the report at: file:///C:/Users/jine/Desktop/firstproject/build/reports/tests/test/index.html* 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.orgBUILD FAILED in 6s4 actionable tasks: 2 executed, 2 up-to-date
-
해결됨스프링 핵심 원리 - 기본편
memberRepository에 대해서
[질문 내용]여기에 질문 내용을 남겨주세요.강의 7분 11초 쯤 나오는 화면에서 memberRepository를 new로 생성했는데 이렇게 하면 bin에 등록 안할시 멤버를 등록할 때 사용한 repository랑 둘이 다른 저장소인거 아닌가요?