안녕하세요. worker thread 편을 학습하다가 문득 궁금한 것이 있어서 이곳 'module'편에 질문 올립니다. const { odd, even } = require('./var'); 에서 { odd, even }, 이 블럭의 문법적 실체는 무엇인가요? 일단, { even, odd } 와 같이 순서를 바꿔도 정상 실행되는 것을 보니 array는 확실히 아닌 것 같고, 그렇다고 다루는 방법을 보면 set 혹은 object 라고 하기에도 애매합니다. 요소를 단독으로 사용하니 말입니다. 감사합니다.
(코드는 하단에) pycharm을 통해 실행하면 큰 사진으로 잘 긁어오는데, 파일 탐색기에서 파일을 더블클릭해서 실행하는 경우 큰 사진으로 안 되네요. 물론 pyinstaller를 이용해 exe 파일로 만들어도 사진은 작게 나와요... - 탐색기 실행 - pycharm에서 버튼 눌러서 실행 Code from selenium import webdriver import urllib.request as request import pyautogui import os import time import random # Activate chromedriver driver = webdriver.Chrome() driver.implicitly_wait(5) search_word = pyautogui.prompt("검색어를 입력해주세요.") driver.get(f'https://www.google.co.kr/search?q={search_word}') driver.maximize_window() # '이미지 검색' click image_search = driver.find_element_by_xpath('//*[@id="hdtb-msb"]/div[1]/div/div[2]/a') image_search.click() # Make a folder if not os.path.exists(search_word): os.makedirs(search_word) # Scroll last_height = driver.execute_script('return document.body.scrollHeight') while True: driver.execute_script("window.scrollTo(0, document.body.scrollHeight);") time.sleep(5) new_height = driver.execute_script('return document.body.scrollHeight') if new_height == last_height: break last_height = new_height # 이미지 개별 클릭 image_click = driver.find_elements_by_css_selector('.rg_i.Q4LuWd') for i, image in enumerate(image_click, start=1): driver.execute_script('arguments[0].click();', image) time.sleep(random.randint(10, 30) * 0.1) target_image = driver.find_element_by_xpath('//*[@id="Sva75c"]/div/div/div[3]/div[2]/c-wiz/div/div[1]/div[1]/div[' '2]/div/a/img') target_source = target_image.get_attribute('src') # src 출력해보면 확장자가 안 뜨니까 그냥 일괄적으로 통일함 opener = request.build_opener() opener.addheaders = [('User-Agent', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) ' 'Chrome/36.0.1941.0 Safari/537.36')] request.install_opener(opener) print('작업이 완료되었습니다.') driver.close()
최근에 c++강의 다 보고는 왔는데 사실 강의만 다 봤을 뿐이지 c++ 사용수준은 강의 듣기전하곤 똑같습니다.. 다만 코드를 봤을떄 완벽하진 않지만 어떤 코드인지 어떻게 작동하는지 정도만 아는수준입니다.. 그래서 인터넷 게임예제 같은거 코드보면서 따라 치면서 익숙해져야겠다 싶어서 찾다 이 강의를 알고 수강을 했는데요 1.1이나 1.2는 작성된 코드에서 한두개만 바꾸는 수준이라 어려움 없이 금방 해결했습니다.. 근데 이번꺼는 어떻게 코드를 짜야겠다는 머리에 그려지는데 그 생각을 코드로 구현하는게 쉽지않네요.. // 예제1 총알을 발사할떄 총알이 사라지지 않고 누적되어 메모리 누수가 발생함 // 해결방법은 게임창과 총알을 인식하게해서 화면 밖으로 나갔을떄 총알을 없애야됨 // //예제2 총알을 연속으로 사용할 경우 앞에 발사된 총알이 사라짐 해결하기 //키를 누를떄 마다 새로운 총알 객체를 생성해야됨 어떤 코드를 써야할지도 모르겠고.. 어떤 코드를 써야될지 모르는 상태라 고민을 해도 제자리 걸음이네요.. 보통은 다 푸는게 정상일까요?? 이것도 일단 완강을 해보고 나중에 풀어야 될까요? 아니면 다른 사람의 코드를 보고 이해한 다음 넘어가거나 나중에 완강후에 새롭게 짜보는게 좋을까요.. 항상 연습문제가 나오면 공부방법 떄문에 고민이 많습니다..
이메일이면 이메일 아이디면 아이디 장고에서는 2개이상의 필드에 대해서 로그인을 지원하지 않는다고 합니다 억지로 기능을 만들면 @ 가 있으면 쿼리셋 검색해서 username을 받아오는 느낌으로 쓰던데 무슨파일에서 하는지도 모르겟구요.. view나 serializer이려나.. 그래서 최대한 장고에서 지원하는 email 필드의 유효성검사를 가져다 쓰면서 둘 혹은 이상의 유저정보로 로그인하는 방법을 구현한다면 어떻게 하면 좋을까요?
[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의 크기도 늘어나는건가요? 따로 답변을 받아도 이해가 잘 가지 않는다면 추가적인 공부 후에 또 정리해서 질문드려도 괜찮은거겠죠..?
좋은강의 감사합니다!! 아래 있던 질문 중 웹팩으로 빌드하고나서 빌드된 파일을 테스트할때 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비트로 계산하면 되는 걸까요? 제가 이해한게 맞는지 궁금합니다
안녕하세요 수업영상과 강의자료 텍스트 상에서는 7행*3열( 7 rows * 3 colums)로 기록되어있는데, 삽화된 그림에는 3행*7열 ( 3 rows * 7 colums)의 테이블로 보여지고 있습니다. 두개의 경우 다 리턴값은 값은 동일하지만 해당 문제는 어느 경우가 기준이고 삽화가 잘못 보여진건지 확인 요청드립니다
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 파일에 싱글턴 싱글톤 이 섞여서 사용되는데 영어라서 한글로 표현할때 싱글턴이나 싱글톤이나 같긴한거같은데 통일되게 사용을 안한 이유같은게 있지는 않겠죠??
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도 켜져있고 쿼리문 잘 작동합니다.