묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결파이썬/장고 웹서비스 개발 완벽 가이드 with 리액트
email 또는 username으로 로그인하기
이메일이면 이메일 아이디면 아이디 장고에서는 2개이상의 필드에 대해서 로그인을 지원하지 않는다고 합니다 억지로 기능을 만들면 @ 가 있으면 쿼리셋 검색해서 username을 받아오는 느낌으로 쓰던데 무슨파일에서 하는지도 모르겟구요.. view나 serializer이려나.. 그래서 최대한 장고에서 지원하는 email 필드의 유효성검사를 가져다 쓰면서 둘 혹은 이상의 유저정보로 로그인하는 방법을 구현한다면 어떻게 하면 좋을까요?
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 기본 강의
html로 뜨시는 분들
잘 읽어보시면 비밀번호가 최대 length 넘었다고 뜨시는 분들도 계실거에요.. 제가 그랬습니다 ㅠ 삽질했네요 maxlength를 없애거나 늘려서 시도해보세요!
-
해결됨[C++과 언리얼로 만드는 MMORPG 게임 개발 시리즈] Part2: 게임 수학과 DirectX12
상수 버퍼에 관련해 질문이 있습니다.
학습 내용에서 Constant Buffer와 Root Signature 강의 두개를 보고 이해가 잘 안가서 질문드립니다. 먼저 Constant Buffer 강의에서는 Resource의 모음집인 _cbvBuffer에 데이터를 넣고 커맨드큐에 0 또는 1번 레지스터가 그 주소를 가리키라고 요청했는데, 이 때 이 방식이 가능한 이유는 Root Parameter를 정해주는 단계에서 InitAsConstantBufferView에서 Shader Visible이 ALL이기 때문인가요? 아니면 _cbvBuffer의 타입이 D3D12_HEAP_TYPE_UPLOAD이기 때문인가요? 또한 D3D12_HEAP_SHADER_VISIBLE이 아닌 D3D12_HEAP_FLAG_NONE인 이유가 있나요? 다음 질문입니다. Root Constant 방식은 각 b0 b1 레지스터가 GPU 메모리에 담긴 정보를 가리키는 형태라고 말씀하셨는데,Descriptor Table을 사용하게 되면 b0 b1 ... b4 레지스터가 Descriptor Heap에 담긴 주소를 가리키게 되는건가요? 아님 다른 방식인가요? 다음 질문입니다. Descriptor Table의 방식을 정리해보면 다음과 같다고 이해하고 있습니다. Constant Buffer의 내용을 Constant Buffer View가 가리키고, 그 내용을 Shader Visible인 Descriptor Heap이 가리키고, 그걸 b0, b1, b2... 에 놓는다. 라고 이해하고 있는데 그냥 Constant Buffer의 내용을 Shader Visible인 Descriptor Heap이 가리키게 하면 한 단계가 더 줄지 않나 싶어서 여쭤봅니다. 마지막 질문입니다. Root Constant 방식을 사용하게 된다면 중복으로 인해 데이터가 덮어씌워질 수 있으니 각 오브젝트가 Constant Buffer를 사용할 때 다른 index를 사용하게 하여 데이터가 덮어씌워지는거를 피했는데, 오브젝트가 늘어나면 늘어날수록 Constant Buffer 속 _cbvBuffer의 크기가 늘어난다고 이해하고 있습니다. 그럼 Descriptor Table 방식은 오브젝트가 늘어나면 늘어날수록 Descriptor Heap의 크기가 늘어나고, 동시에 Constant Buffer View의 크기도 늘어나는건가요? 따로 답변을 받아도 이해가 잘 가지 않는다면 추가적인 공부 후에 또 정리해서 질문드려도 괜찮은거겠죠..?
-
미해결프론트엔드 개발자를 위한, 실전 웹 성능 최적화(feat. React) - Part. 1
webpack-dev-server
좋은강의 감사합니다!!아래 있던 질문 중 웹팩으로 빌드하고나서 빌드된 파일을 테스트할때 live server나 lite server를 이용하면 된다고 해주셨는데요 webpack-dev-server도 이용해도 되나요? 그렇다면 live server , lite server , webpack-dev-server 중 어떤 기준으로 테스트할 서버를 선택하는것이 좋을까요?
-
미해결[C++과 언리얼로 만드는 MMORPG 게임 개발 시리즈] Part1: C++ 프로그래밍 입문
부동소수점 지수에 관한건데
단 지수는 unsigned byte라고 가정하고 숫자 + 127 을 만들어주는 이유는 혹시라도 지수가 커질 것을 대비해 254를 더하는 것이 아닌 그의 반절 127을 더하는 것으로 이해하면 될까요? 그리고 double의 지수 부분에 대해서 궁금한게 있는데 float가 지수부분이 8이라서 1바이트라면 double의 지수는 11인데 몇바이트로 계산하는 것이 아닌 11비트로 계산하면 되는 걸까요? 제가 이해한게 맞는지 궁금합니다
-
미해결따라하며 배우는 TDD 개발 [2023.11 업데이트]
안녕하세요. 문의드립니다.
항상 좋은 강의 제공해주셔서 감사합니다. 다름이 아니라 항상 강의를 들으면 개인블로그에 정리를 하고 있습니다. 그래서 혹시 지금 이 강의도 제공해주신 자료 / 코드 등을 활용해서 따로 제가 공부한 내용을 정리해도 괜찮은지 궁금합니다. 출저는 명확하게 남기겠습니다!
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
memberService.getClass()
@Test@DisplayName("빈 이름으로 조회")void findBeanByName(){ MemberService memberService = ac.getBean("memberService", MemberService.class); System.out.println("memberService = " + memberService); System.out.println("memberService.getClass() = " + memberService.getClass()); Assertions.assertThat(memberService).isInstanceOf(MemberServiceImpl.class);여기에서 memberService = " + memberService하고 "memberService.getClass() = " + memberService.getClass()의 차이는 뭐에요??둘다 memberServiceImpl에 속한 걸로 같은거 아닌가요?
-
미해결정말 쉽게 풀어보는 코딩 테스트 top 기본 문제 (with 자바)
강의자료에 나오는 m과 n의 범위가 코딩하고 다른거 같습니다
안녕하세요 수업영상과 강의자료 텍스트 상에서는 7행*3열( 7 rows * 3 colums)로 기록되어있는데, 삽화된 그림에는 3행*7열 ( 3 rows * 7 colums)의 테이블로 보여지고 있습니다. 두개의 경우 다 리턴값은 값은 동일하지만 해당 문제는 어느 경우가 기준이고 삽화가 잘못 보여진건지 확인 요청드립니다
-
미해결스프링과 JPA 기반 웹 애플리케이션 개발
스프링이 자동으로 재실행됩니다.
실행은 정상적으로 되는데. 계속 자동으로 재시작이 됩니다.. 초반부에서도 재시작되는 경우가 있긴했는데. 가끔가다 간혈적으로 한번 그러길래 넘겼는데. 진행하다보니깐 재시작을 너무 많이해서. 어려움이 있어서. 질문드립니다. 쓰레드 관련 문제인가 싶기도한데. 그쪽 부분은 @Asnyc 사용하려고 @EnableAsnyc밖에 없는데. 혹시 무슨 문제인지 알수있을까요? . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v2.6.2) 2022-01-07 00:01:30.090 INFO 18482 --- [ restartedMain] c.p.o.OttShareServiceApplication : Starting OttShareServiceApplication using Java 16.0.2 on ijaegeon-ui-MacBookAir.local with PID 18482 (/Users/jaegeon/Desktop/projects/ott-share-service/build/classes/java/main started by jaegeon in /Users/jaegeon/Desktop/projects/ott-share-service) 2022-01-07 00:01:30.091 INFO 18482 --- [ restartedMain] c.p.o.OttShareServiceApplication : No active profile set, falling back to default profiles: default 2022-01-07 00:01:30.528 INFO 18482 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. 2022-01-07 00:01:30.573 INFO 18482 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 32 ms. Found 2 JPA repository interfaces. 2022-01-07 00:01:30.713 INFO 18482 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http) 2022-01-07 00:01:30.716 INFO 18482 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat] 2022-01-07 00:01:30.716 INFO 18482 --- [ restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.56] 2022-01-07 00:01:30.727 INFO 18482 --- [ restartedMain] o.a.c.c.C.[Tomcat-5].[localhost].[/] : Initializing Spring embedded WebApplicationContext 2022-01-07 00:01:30.728 INFO 18482 --- [ restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 636 ms 2022-01-07 00:01:30.745 INFO 18482 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-7 - Starting... 2022-01-07 00:01:30.759 INFO 18482 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-7 - Start completed. 2022-01-07 00:01:30.759 INFO 18482 --- [ restartedMain] o.s.b.a.h2.H2ConsoleAutoConfiguration : H2 console available at '/h2-console'. Database available at 'jdbc:h2:mem:799ee181-6d24-4b70-be20-790fa206adfc' 2022-01-07 00:01:30.789 INFO 18482 --- [ restartedMain] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default] 2022-01-07 00:01:30.794 INFO 18482 --- [ restartedMain] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect 2022-01-07 00:01:30.918 INFO 18482 --- [ restartedMain] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform] 2022-01-07 00:01:30.918 INFO 18482 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' 2022-01-07 00:01:30.934 WARN 18482 --- [ restartedMain] 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 warning 2022-01-07 00:01:30.941 WARN 18482 --- [ restartedMain] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mailSenderImpl' defined in file [/Users/jaegeon/Desktop/projects/ott-share-service/build/classes/java/main/com/project/ottshareservice/mail/MailSenderImpl.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.mail.javamail.JavaMailSender' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {} 2022-01-07 00:01:30.941 INFO 18482 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default' 2022-01-07 00:01:30.941 INFO 18482 --- [ restartedMain] .SchemaDropperImpl$DelayedDropActionImpl : HHH000477: Starting delayed evictData of schema as part of SessionFactory shut-down' 2022-01-07 00:01:31.154 WARN 18482 --- [ restartedMain] o.s.b.f.support.DisposableBeanAdapter : Invocation of destroy method failed on bean with name 'inMemoryDatabaseShutdownExecutor': org.h2.jdbc.JdbcSQLNonTransientConnectionException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-200] 2022-01-07 00:01:31.155 INFO 18482 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-7 - Shutdown initiated... 2022-01-07 00:01:31.156 INFO 18482 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-7 - Shutdown completed. 2022-01-07 00:01:31.157 INFO 18482 --- [ restartedMain] o.apache.catalina.core.StandardService : Stopping service [Tomcat] 2022-01-07 00:01:31.172 INFO 18482 --- [ restartedMain] ConditionEvaluationReportLoggingListener : Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2022-01-07 00:01:31.187 ERROR 18482 --- [ restartedMain] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPLICATION FAILED TO START *************************** Description: Parameter 0 of constructor in com.project.ottshareservice.mail.MailSenderImpl required a bean of type 'org.springframework.mail.javamail.JavaMailSender' that could not be found. Action: Consider defining a bean of type 'org.springframework.mail.javamail.JavaMailSender' in your configuration. . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v2.6.2) 이런식으로 반복됩니다.
-
미해결Flutter 입문 확장판 - 인스타그램 클론 2.0
field does not exist within the DocumentSnapshotPlatform 에러 문의
commentCount같이 기존 'Post'콜렌션에 없는 다큐먼트 필드들을 만들때마다 field does not exist within the DocumentSnapshotPlatform라는 에러가 뜹니다 플러터가 업그레이드 되서 그런지 강의 내용 중 widget.document['likedUsers']?.length ?? 0 요런 형식으로 바뀌어도 field does not exist within the DocumentSnapshotPlatform라는 에러가 뜹니다 post로 가서 일일히 해당 필드를 수동으로 업데이트를 해줘야 하는데요 게시물이 10개있으면 10번 업데이트 해줘야되는 번거로움이 있습니다. 혹시 다른 방법이 있을까요(예외처리 혹은 없는 필드 강제로 update시켜주기 등)
-
미해결스프링 핵심 원리 - 기본편
싱글톤 컨테이너 중 싱글톤?? 싱글턴??
[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]싱글톤 컨테이너 강의중 PDF 파일에 싱글턴 싱글톤 이 섞여서 사용되는데 영어라서 한글로 표현할때 싱글턴이나 싱글톤이나 같긴한거같은데 통일되게 사용을 안한 이유같은게 있지는 않겠죠??
-
미해결스프링 핵심 원리 - 기본편
getBean 메소드와 인스턴스 관련 질문
1. getBean 메소드의 반환값은 해당 빈의 객체인가요? MemberRepository memberRepository = ac.getBean("memberRepository1", MemberRepository.class); 여기에서 memberRepository에는 MemoryMemberRepository의 객체가 들어가나요? (혹은 참조값) 2. MemberRepository memberRepository = ac.getBean("memberRepository1", MemberRepository.class); assertThat(memberRepository).isInstanceOf(MemberRepository.class); memberRepository가 MemberRepository.class의 인스턴스라는게 이해가 잘 안됩니다. MemoryMemberRepository.class의 인스턴스 아닌가요? memberRepository에 MemoryMemberRepository의 객체가 들어간다면 MemoryMemberRepository는 MemberRepository의 구현체이므로 MemberRepository의 인스턴스로 보는 건가요?
-
미해결[C++과 언리얼로 만드는 MMORPG 게임 개발 시리즈] Part4: 게임 서버
WriteLock 함수의 desired값 초기화 관련 질문
WriteLock() 의 desired변수 초기화할때 LThreadId << 16 연산으로 인해 앞 16비트가 0이라는것이 보장되는데도 WRITE_THREAD_MASK로 &연산을 해준것은 가독성 때문이 맞을까요?
-
미해결파이썬/장고 웹서비스 개발 완벽 가이드 with 리액트
업로드된 git 코드 오류 질문
선생님~ 선생님이 git에 올려주신 _post_card.html에서 $('#post-10-comment-list').prepend(responseText); 가 $("#post{post.pk}}-comment-list").prepend(responseText);로 바뀌어야 하지 않나요??
-
해결됨스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
JPA강의 중 테스트 코드(회원가입) 실행 시 오류가 발생합니다
23:12:28.918 [main] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating CacheAwareContextLoaderDelegate from class [org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate] 23:12:28.934 [main] 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)] 23:12:28.994 [main] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating TestContextBootstrapper for test class [hello.hellospring.service.MemberServiceIntegrationTest] from class [org.springframework.boot.test.context.SpringBootTestContextBootstrapper] 23:12:29.014 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Neither @ContextConfiguration nor @ContextHierarchy found for test class [hello.hellospring.service.MemberServiceIntegrationTest], using SpringBootContextLoader 23:12:29.020 [main] DEBUG org.springframework.test.context.support.AbstractContextLoader - Did not detect default resource location for test class [hello.hellospring.service.MemberServiceIntegrationTest]: class path resource [hello/hellospring/service/MemberServiceIntegrationTest-context.xml] does not exist 23:12:29.021 [main] DEBUG org.springframework.test.context.support.AbstractContextLoader - Did not detect default resource location for test class [hello.hellospring.service.MemberServiceIntegrationTest]: class path resource [hello/hellospring/service/MemberServiceIntegrationTestContext.groovy] does not exist 23:12:29.021 [main] INFO org.springframework.test.context.support.AbstractContextLoader - Could not detect default resource locations for test class [hello.hellospring.service.MemberServiceIntegrationTest]: no resource found for suffixes {-context.xml, Context.groovy}. 23:12:29.022 [main] INFO org.springframework.test.context.support.AnnotationConfigContextLoaderUtils - Could not detect default configuration classes for test class [hello.hellospring.service.MemberServiceIntegrationTest]: MemberServiceIntegrationTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. 23:12:29.099 [main] DEBUG org.springframework.test.context.support.ActiveProfilesUtils - Could not find an 'annotation declaring class' for annotation type [org.springframework.test.context.ActiveProfiles] and class [hello.hellospring.service.MemberServiceIntegrationTest] 23:12:29.233 [main] DEBUG org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider - Identified candidate component class: file [C:\introSpring\hello-spring\out\production\classes\hello\hellospring\HelloSpringApplication.class] 23:12:29.240 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Found @SpringBootConfiguration hello.hellospring.HelloSpringApplication for test class hello.hellospring.service.MemberServiceIntegrationTest 23:12:29.444 [main] DEBUG org.springframework.boot.test.context.SpringBootTestContextBootstrapper - @TestExecutionListeners is not present for class [hello.hellospring.service.MemberServiceIntegrationTest]: using defaults. 23:12:29.445 [main] 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] 23:12:29.476 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Using TestExecutionListeners: [org.springframework.test.context.web.ServletTestExecutionListener@119020fb, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener@3d9f6567, org.springframework.test.context.event.ApplicationEventsTestExecutionListener@c055c54, org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener@25e2ab5a, org.springframework.boot.test.autoconfigure.SpringBootDependencyInjectionTestExecutionListener@35e5d0e5, org.springframework.test.context.support.DirtiesContextTestExecutionListener@73173f63, org.springframework.test.context.transaction.TransactionalTestExecutionListener@55562aa9, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener@655ef322, org.springframework.test.context.event.EventPublishingTestExecutionListener@7e276594, org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener@3401a114, org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestExecutionListener@5066d65f, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestExecutionListener@4233e892, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListener@77d2e85, org.springframework.boot.test.autoconfigure.webservices.client.MockWebServiceServerTestExecutionListener@3ecd267f, org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener@58ffcbd7] 23:12:29.484 [main] DEBUG org.springframework.test.context.support.AbstractDirtiesContextTestExecutionListener - Before test class: context [DefaultTestContext@704f1591 testClass = MemberServiceIntegrationTest, testInstance = [null], testMethod = [null], testException = [null], mergedContextConfiguration = [WebMergedContextConfiguration@58fb7731 testClass = MemberServiceIntegrationTest, locations = '{}', classes = '{class hello.hellospring.HelloSpringApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.autoconfigure.actuate.metrics.MetricsExportContextCustomizerFactory$DisableMetricExportContextCustomizer@376a0d86, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@13df2a8c, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@163370c2, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@35a3d49f, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@57a3e26a, org.springframework.boot.test.context.SpringBootTestArgs@1, org.springframework.boot.test.context.SpringBootTestWebEnvironment@23bb8443], 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]. 23:12:29.594 [main] DEBUG org.springframework.boot.ApplicationServletEnvironment - Activating profiles [] 23:12:29.595 [main] DEBUG org.springframework.test.context.support.TestPropertySourceUtils - Adding inlined properties to environment: {spring.jmx.enabled=false, org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true} . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v2.6.2) 2022-01-06 23:12:30.099 INFO 16868 --- [ main] h.h.s.MemberServiceIntegrationTest : Starting MemberServiceIntegrationTest using Java 11.0.13 on DESKTOP-MUGIJNP with PID 16868 (started by tuv in C:\introSpring\hello-spring) 2022-01-06 23:12:30.100 INFO 16868 --- [ main] h.h.s.MemberServiceIntegrationTest : No active profile set, falling back to default profiles: default 2022-01-06 23:12:31.140 INFO 16868 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. 2022-01-06 23:12:31.165 INFO 16868 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 13 ms. Found 0 JPA repository interfaces. 2022-01-06 23:12:31.980 INFO 16868 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default] 2022-01-06 23:12:32.062 INFO 16868 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.6.3.Final 2022-01-06 23:12:32.295 INFO 16868 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.2.Final} 2022-01-06 23:12:32.909 INFO 16868 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... 2022-01-06 23:12:32.987 INFO 16868 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. 2022-01-06 23:12:33.031 INFO 16868 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect 2022-01-06 23:12:33.852 INFO 16868 --- [ main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform] 2022-01-06 23:12:33.868 INFO 16868 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' 2022-01-06 23:12:34.346 WARN 16868 --- [ main] 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 warning 2022-01-06 23:12:34.872 INFO 16868 --- [ main] o.s.b.a.w.s.WelcomePageHandlerMapping : Adding welcome page: class path resource [static/index.html] 2022-01-06 23:12:35.406 INFO 16868 --- [ main] h.h.s.MemberServiceIntegrationTest : Started MemberServiceIntegrationTest in 5.808 seconds (JVM running for 7.655) 2022-01-06 23:12:35.555 INFO 16868 --- [ main] o.s.t.c.transaction.TransactionContext : Began transaction (1) for test context [DefaultTestContext@704f1591 testClass = MemberServiceIntegrationTest, testInstance = hello.hellospring.service.MemberServiceIntegrationTest@d70dbeb, testMethod = join@MemberServiceIntegrationTest, testException = [null], mergedContextConfiguration = [WebMergedContextConfiguration@58fb7731 testClass = MemberServiceIntegrationTest, locations = '{}', classes = '{class hello.hellospring.HelloSpringApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.autoconfigure.actuate.metrics.MetricsExportContextCustomizerFactory$DisableMetricExportContextCustomizer@376a0d86, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@13df2a8c, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@163370c2, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@35a3d49f, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@57a3e26a, org.springframework.boot.test.context.SpringBootTestArgs@1, org.springframework.boot.test.context.SpringBootTestWebEnvironment@23bb8443], resourceBasePath = 'src/main/webapp', contextLoader = 'org.springframework.boot.test.context.SpringBootContextLoader', parent = [null]], attributes = map['org.springframework.test.context.web.ServletTestExecutionListener.activateListener' -> true, 'org.springframework.test.context.web.ServletTestExecutionListener.populatedRequestContextHolder' -> true, 'org.springframework.test.context.web.ServletTestExecutionListener.resetRequestContextHolder' -> true, 'org.springframework.test.context.event.ApplicationEventsTestExecutionListener.recordApplicationEvents' -> false]]; transaction manager [org.springframework.orm.jpa.JpaTransactionManager@2573b149]; rollback [true] Hibernate: select member0_.id as id1_0_, member0_.name as name2_0_ from member member0_ where member0_.name=? Hibernate: insert into member (id, name) values (null, ?) 2022-01-06 23:12:35.981 WARN 16868 --- [ main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 23502, SQLState: 23502 2022-01-06 23:12:35.981 ERROR 16868 --- [ main] o.h.engine.jdbc.spi.SqlExceptionHelper : NULL not allowed for column "ID"; SQL statement: insert into member (id, name) values (null, ?) [23502-200] 2022-01-06 23:12:36.001 INFO 16868 --- [ main] o.s.t.c.transaction.TransactionContext : Rolled back transaction for test: [DefaultTestContext@704f1591 testClass = MemberServiceIntegrationTest, testInstance = hello.hellospring.service.MemberServiceIntegrationTest@d70dbeb, testMethod = join@MemberServiceIntegrationTest, testException = javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement, mergedContextConfiguration = [WebMergedContextConfiguration@58fb7731 testClass = MemberServiceIntegrationTest, locations = '{}', classes = '{class hello.hellospring.HelloSpringApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.autoconfigure.actuate.metrics.MetricsExportContextCustomizerFactory$DisableMetricExportContextCustomizer@376a0d86, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@13df2a8c, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@163370c2, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@35a3d49f, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@57a3e26a, org.springframework.boot.test.context.SpringBootTestArgs@1, org.springframework.boot.test.context.SpringBootTestWebEnvironment@23bb8443], resourceBasePath = 'src/main/webapp', contextLoader = 'org.springframework.boot.test.context.SpringBootContextLoader', parent = [null]], attributes = map['org.springframework.test.context.web.ServletTestExecutionListener.activateListener' -> true, 'org.springframework.test.context.web.ServletTestExecutionListener.populatedRequestContextHolder' -> true, 'org.springframework.test.context.web.ServletTestExecutionListener.resetRequestContextHolder' -> true, 'org.springframework.test.context.event.ApplicationEventsTestExecutionListener.recordApplicationEvents' -> false]] javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:154) at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:181) at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:188) at org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:766) at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:746) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:311) at com.sun.proxy.$Proxy90.persist(Unknown Source) at hello.hellospring.repository.JpaMemberRepository.save(JpaMemberRepository.java:19) at hello.hellospring.service.MemberService.join(MemberService.java:27) at hello.hellospring.service.MemberService$$FastClassBySpringCGLIB$$530c61b7.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753) 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.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698) at hello.hellospring.service.MemberService$$EnhancerBySpringCGLIB$$6be7ef37.join(<generated>) at hello.hellospring.service.MemberServiceIntegrationTest.join(MemberServiceIntegrationTest.java:31) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) 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.base/java.util.ArrayList.forEach(ArrayList.java:1541) 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.base/java.util.ArrayList.forEach(ArrayList.java:1541) 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 com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:71) at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33) at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235) at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54) 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:760) ... 89 more Caused by: org.h2.jdbc.JdbcSQLIntegrityConstraintViolationException: NULL not allowed for column "ID"; SQL statement: insert into member (id, name) values (null, ?) [23502-206] at org.h2.message.DbException.getJdbcSQLException(DbException.java:527) at org.h2.message.DbException.getJdbcSQLException(DbException.java:496) at org.h2.message.DbException.get(DbException.java:227) at org.h2.message.DbException.get(DbException.java:203) at org.h2.table.Column.validateConvertUpdateSequence(Column.java:365) at org.h2.table.Table.convertInsertRow(Table.java:917) at org.h2.command.dml.Insert.insertRows(Insert.java:167) at org.h2.command.dml.Insert.update(Insert.java:135) at org.h2.command.CommandContainer.executeUpdateWithGeneratedKeys(CommandContainer.java:246) at org.h2.command.CommandContainer.update(CommandContainer.java:167) at org.h2.command.Command.executeUpdate(Command.java:252) at org.h2.server.TcpServerThread.process(TcpServerThread.java:408) at org.h2.server.TcpServerThread.run(TcpServerThread.java:191) at java.base/java.lang.Thread.run(Thread.java:832) at org.h2.message.DbException.getJdbcSQLException(DbException.java:459) at org.h2.engine.SessionRemote.done(SessionRemote.java:611) at org.h2.command.CommandRemote.executeUpdate(CommandRemote.java:237) at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:191) at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:152) 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) ... 107 more 2022-01-06 23:12:36.028 INFO 16868 --- [ionShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default' 2022-01-06 23:12:36.031 INFO 16868 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... 2022-01-06 23:12:36.045 INFO 16868 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed. Process finished with exit code -1 제 생각엔 Caused by: org.h2.jdbc.JdbcSQLIntegrityConstraintViolationException: NULL not allowed for column "ID"; SQL statement: insert into member (id, name) values (null, ?) [23502-206] 부분이 문제인 것 같은데 강사님 영상의 로그에서는 저렇게 출력되어도 잘 작동되고 id는 잘 생성된다고 하셨습니다. 근데 안되네요 ㅠㅠ 어디가 문제일까요? 코드는 동일합니다. H2도 켜져있고 쿼리문 잘 작동합니다.
-
미해결Vue.js 중급 강좌 - 웹앱 제작으로 배워보는 Vue.js, ES6, Vuex
깃 권한 부탁드립니다.
인프런 아이디 : IAMSUN 인프런 이메일 : dlatjs4380@gmail.com 깃헙 아이디 : dlatjs4380@gmail.com 깃헙 Username : KangImseon
-
해결됨10주완성 C++ 코딩테스트 | 알고리즘 코딩테스트
2-S DFS 시간초과
#include <bits/stdc++.h> #define endl '\n' using namespace std; vector<int> adjList[10002]; bool visited[10002]; int n, m; int _max = INT_MIN; map<int, int> virus; void fastIO() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); } void DFS(int v, int sum, int com) { _max = max(_max, sum); virus[com] = max(virus[com], sum); for (auto adjV : adjList[v]) { visited[adjV] = 1; DFS(adjV, sum + 1, com); visited[adjV] = 0; } } int main() { fastIO(); //freopen("input.txt", "rt", stdin); cin >> n >> m; for (int i = 0; i < m; i++) { int a, b; cin >> a >> b; adjList[b].push_back(a); } for (int i = 1; i <= 10000; i++) { if (adjList[i].empty()) continue; visited[i] = 1; DFS(i, 1, i); visited[i] = 0; } for (auto e : virus) { if (e.second == _max) { cout << e.first << ' '; } } return EXIT_SUCCESS; } 인접리스트 DFS로 풀었는데 시간 초과가 납니다. 뭐가 문제일까요..?
-
미해결[신규 개정판] 이것이 진짜 크롤링이다 - 기본편
타입에러 질문드립니다.
안녕하세요 유익한 강의 감사드립니다. 마지막 강의에서 검색된 상품 정보를 무한 스크롤링하는 것까진 정상적으로 동작했는데 for문으로 리스트 정보를 불러오는 부분에서 'WebElement' object is not iterable 타입에러가 발생합니다. 터미널에서는 다음과 같이 에러가 뜹니다. 이럴 경우에 어떻게 해결해야 하나요?
-
미해결스프링 핵심 원리 - 기본편
스프링 컨테이너와 싱글톤 패턴에 대해 질문드립니다.
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]여기에 질문 내용을 남겨주세요. 안녕하세요. 싱글톤에 관련하여 질문이 있습니다. 1. 싱글톤 컨테이너를 배우면서 '스프링 컨테이너는 싱글톤 패턴을 적용하지 않아도, 객체 인스턴스를 싱글톤으로 관리한다.' 라는 문장이 있는데 스프링 컨테이너가 클래스의 인스턴스가 1개만 생성하도록 보장하는 것(싱글톤 패턴)이 아닌가요? 그렇다면 스프링 컨테이너도 싱글톤 패턴을 적용하고 있는 것이 아닌가요? 저는 스프링 컨테이너가 스프링에서 싱글톤 패턴을 적용해준 것이고, 이를 위한 코드를 직접 짜지 않아도 되기 때문에 자유롭다 + Configuration을 이용하여 DIP, OCP 문제를 해결하였다 라고 이해하였는데, 잘못 이해한 것인가요? 2. 싱글톤 패턴의 문제점에서, private 생성자로 자식 클래스를 만들기 어렵다는 내용이 있는데, constructor가 private이면 자식에게 extends 될 수 없나요? 감사합니다.
-
미해결스프링 배치
JOB 상태값 관련 질문
안녕하세요 상태값 관련해서 질문이 있습니다. 18:07초에서 step2()가 COMPLETED 되어도 on에는 PASS만 정의되어 있기 때문에 step2의 ExitStatus가 PASS가 아니라면 Job의 BatchStatus와 ExitStatus는 FAILED로 된다고 설명해주셨는데요. 이에 관한 내용은 SimpleJob 부분에서 다뤄주신다고 하셨는데 뒤쪽에 언급이 없으셔서 질문 남기게 되었습니다. 강의 내용처럼 하게 되면 on에 PASS를 넣으면 말씀하신대로 JobExecution이 FAILED가 나옵니다. 설명해주신 맥락대로라면 step2의 on을 FAILED로 두고, step2를 COMPLETED 통과시킨다면 step2에 COMPLETED에 대한 내용은 flow는 정의하지 않았으니 JOB의 BatchStatus와 ExitStatus는 결과적으로는 FAILED가 되어야 하는데 DB를 보면 COMPLETED 상태로 표기되고 있습니다. 즉, 결과는 아래와 같습니다. on에 custom한 ExitStatus(PASS)를 적용하고 step의 ExitStatus를 COMPLETE로 보내면 JOB의 상태는 FAILED로 찍힌다. on에 custom하지 않은 ExitStatus(FAILED)를 적용하고 step의 ExitStatus를 COMPLETED로 보내면 JOB의 상태는 COMPLETED로 찍힌다. 그렇다면 결론적으로 Custom한 ExitStatus값만으로 on에 조건을 걸고 실행시 Step의 ExitStatus가 on조건에 매칭되지 않는다면 Job의 상태는 FAILED이고, 일반적인 ExitStatus값을 on에 조건을 걸고 실행 시 Step의 ExitStatus가 on조건에 매칭되지 않는다면 위의 custom처럼 FAILED가 아니라 해당 Step의 ExitStatus 값으로 Job의 상태가 업데이트 된다. 이렇게 나는데 잘 이해하고 있는게 맞을까요? @Configuration@RequiredArgsConstructorpublic class TestJobConfiguration { private final JobBuilderFactory jobBuilderFactory; private final StepBuilderFactory stepBuilderFactory; @Bean public Job helloJob() { return jobBuilderFactory.get("job") .start(step1()) .on("COMPLETED") .stop() .from(step1()) .on("*") .to(step2()) .on("FAILED") .stop() .end() .build(); } @Bean public Step step1() { return stepBuilderFactory.get("step1") .tasklet((contribution, chunkContext) -> { System.out.println("step1 completed"); contribution.setExitStatus(ExitStatus.FAILED); return RepeatStatus.FINISHED; }) .build(); } @Bean public Step step2() { return stepBuilderFactory.get("step2") .tasklet((contribution, chunkContext) -> { System.out.println("step2 completed"); return RepeatStatus.FINISHED; }) .build(); }