M1 콘텐츠 폴리싱 부분에서 다뤄질 예정이었던 부분중에 인벤토리 관련하여 궁금한점이 있습니다. 우루루 용병단과는 달리 개개인의 히어로가 서로 다른 장비를 각각 착용하는 시스템으로 만들거라고 하셨는데요 제가 구현한다면 히어로에 리스트나 딕셔너리로 작은 인벤토리를 각각 들고있게끔 하고 히어로가 아이템의 고유번호를 가지고 있던가 아이템이 히어로의 고유번호를 가지고 있어 해당 번호를 세이브 데이터로 저장하고 불러올때는 착용상태인 아이템 중에서 그 번호를 이용하여 다시 착용하는 방식으로 불러온다 이정도 방법밖에는 딱히 떠오르지 않네요. 루키스님 강의를 보다보면 스킬을 구현하는것은 정답이 없지만 장비관련은 어느정도 현업에서 자주 사용되는 방식이 있다고 들었는데요 선생님께서 생각하시는 정답이 무엇인지, M1 폴리싱 파트에서 구현하실때는 어떤 방식으로 구현하실 예정이셨는지 궁금합니다! 그리고 한가지 더 T2 강의에 대해서 궁금한 점이 있습니다. T2 강의에서는 M1에서 다뤄지지 못했던 결제 우편 어드레서블 관리 등등 기능들에 대한 강의부터 시작하는지 아니면 다시 게임의 토대부터 쌓아가는 작업부터 시작하는 것인지도 궁금합니다.
복습하다 문득 이 코드를 보고 생각이 들었습니다. ArrayList<MyUser> list = new ArrayList<>(List.of(myUser1, myUser2, myUser3)); List<MyUser> list1 = List.of(myUser1, myUser2, myUser3); List로 반환되는 건 맞는 거 같은데... static <E> List<E> of(E e1, E e2, E e3) { return ImmutableCollections.listFromTrustedArray(e1, e2, e3); } List.of()는 분명 List타입으로 반환이 되는데 ArrayList에 어떻게 들어가는 건가요? List가 ArrayList를 받을 수는 있지만, 그 반대는 안 되는 거 아닌가 해서요!!
ubuntu@ip-172-31-86-200:~/memberCertification$ ./gradlew clean build Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation. BUILD FAILED in 15s 8 actionable tasks: 8 executed ubuntu@ip-172-31-86-200:~/memberCertification$ ./gradlew clean build > Task :test MemberCertificationApplicationTests > contextLoads() FAILED java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:180 Caused by: org.springframework.beans.factory.BeanCreationException at AbstractAutowireCapableBeanFactory.java:1773 Caused by: org.hibernate.service.spi.ServiceException at AbstractServiceRegistryImpl.java:276 Caused by: org.hibernate.HibernateException at DialectFactoryImpl.java:191 1 test completed, 1 failed > Task :test FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':test'. > There were failing tests. See the report at: file:///home/ubuntu/memberCertification/build/reports/tests/test/index.html * Try: > Run with --scan to get full insights. Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation. BUILD FAILED in 15s 8 actionable tasks: 8 executed ubuntu@ip-172-31-86-200:~/memberCertification$ ./gradlew clean build > Task :test MemberCertificationApplicationTests > contextLoads() FAILED java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:180 Caused by: org.springframework.beans.factory.BeanCreationException at AbstractAutowireCapableBeanFactory.java:1773 Caused by: org.hibernate.service.spi.ServiceException at AbstractServiceRegistryImpl.java:276 Caused by: org.hibernate.HibernateException at DialectFactoryImpl.java:191 1 test completed, 1 failed > Task :test FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':test'. > There were failing tests. See the report at: file:///home/ubuntu/memberCertification/build/reports/tests/test/index.html * Try: > Run with --scan to get full insights. Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation. BUILD FAILED in 14s 8 actionable tasks: 8 executed 구글에 검색해본 결과, java: error: invalid flag: --warning-mode=all을 하면 된다는 글을 보고 Preferences > Compiler > java Compiler에 --warning-mode all --stacktrace 입력을 하고 실행을 해봤습니다. java: error: invalid flag: --warning-mode=all가 발생하며 실행이 되지 않습니다. 어떻게 해야 에러를 고칠 수 있을까요 ?
일방적인 수업이 아닌 양방향의 수업을 지향합니다. 게시판에서 질문을 적극적으로 활용하세요. (이해가 되실 때까지 지속적으로 질문을 던지시는 것이 중요합니다. 업무일 기준 2~3일 내에 답변을 드릴 수 있도록 최선을 다하겠습니다.) 다만, 질문이 이해될 수 있도록 (상식 수준에서), 다듬어 주세요. 게시판 공개가 어려운 경우에 메일로 연락주시길 요청 드립니다. (daniel@datatrain.education) 수업을 빠르게 한 번 쭉 들으신 후에, 한 번 더 학습하실 것을 권장드립니다. 안녕하세요 강사님 수업을 듣다가 궁금한 점이 있어 질문 드립니다. 수업을 들으면서 devcontainer.json를 생성하고 rebuild container를 하면 1. devcontainer.json의 "build" 정보를 이용하여 docker build 를 진행 docker run ~ 그 외 추가적인 과정 한다고 이해했습니다. 그리고 Dockerfile을 image로 만들 때, build를 하는 것으로 알고있습니다. 실습에서 Dockerfile과 json 파일에서 "build" 부분을 수정하지 않고, "runArgs", "customization" 을 추가했는데 build를 다시 해야하는 점이 이해가 가지 않습니다...ㅠㅠ devcontainer.json의 수정 사항을 적용하거나 실행하기 위해서는 build과정이 필요해서 그런 것 일까요?? 그리고 devcontainer.json을 수정하고 rebuild하면 container가 재생성이 되는 것인가요?? 또한 처음에 devcontainer.json 파일을 생성하고 New Dev Container 가 아닌 Rebuild container를 하는 이유도 궁급합니다. 감사합니다.
안녕하세요 강의를 수강하던 도중 Eureka에 연결해 놓은 프로젝트를 종료하면 모든 프로젝트에서 아래와 같은 에러가 발생합니다 해결방안이 있을까요? 2024-05-28T23:22:04.304+09:00 INFO 42143 --- [apigateway-service] [ionShutdownHook] o.s.c.n.e.s.EurekaServiceRegistry : Unregistering application APIGATEWAY-SERVICE with eureka with status DOWN 2024-05-28T23:22:04.304+09:00 INFO 42143 --- [apigateway-service] [ionShutdownHook] com.netflix.discovery.DiscoveryClient : Saw local status change event StatusChangeEvent [timestamp=1716906124304, current=DOWN, previous=UP] 2024-05-28T23:22:04.304+09:00 DEBUG 42143 --- [apigateway-service] [nfoReplicator-0] c.n.discovery.InstanceInfoReplicator : Executing on-demand update of local InstanceInfo 2024-05-28T23:22:04.304+09:00 DEBUG 42143 --- [apigateway-service] [nfoReplicator-0] c.n.discovery.InstanceInfoReplicator : Canceling the latest scheduled update, it will be rescheduled at the end of on demand update 2024-05-28T23:22:04.304+09:00 INFO 42143 --- [apigateway-service] [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_APIGATEWAY-SERVICE/192.168.75.30:apigateway-service:8000: registering service... 2024-05-28T23:22:04.309+09:00 INFO 42143 --- [apigateway-service] [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_APIGATEWAY-SERVICE/192.168.75.30:apigateway-service:8000 - registration status: 204 2024-05-28T23:22:06.396+09:00 INFO 42143 --- [apigateway-service] [ionShutdownHook] com.netflix.discovery.DiscoveryClient : Shutting down DiscoveryClient ... 2024-05-28T23:22:09.402+09:00 INFO 42143 --- [apigateway-service] [ionShutdownHook] com.netflix.discovery.DiscoveryClient : Unregistering ... 2024-05-28T23:22:09.410+09:00 INFO 42143 --- [apigateway-service] [ionShutdownHook] c.n.d.s.t.d.RedirectingEurekaHttpClient : Request execution error. endpoint=DefaultEndpoint{ serviceUrl='http://localhost:8761/eureka/} exception=Connection pool shut down stacktrace=java.lang.IllegalStateException: Connection pool shut down 중략... 2024-05-28T23:22:09.413+09:00 INFO 42143 --- [apigateway-service] [ionShutdownHook] c.n.d.s.t.d.RedirectingEurekaHttpClient : Request execution error. endpoint=DefaultEndpoint{ serviceUrl='http://localhost:8761/eureka/}, exception=Connection pool shut down stacktrace=java.lang.IllegalStateException: Connection pool shut down 중략... 2024-05-28T23:22:09.413+09:00 WARN 42143 --- [apigateway-service] [ionShutdownHook] c.n.d.s.t.d.RetryableEurekaHttpClient : Request execution failed with message: Connection pool shut down 2024-05-28T23:22:09.413+09:00 ERROR 42143 --- [apigateway-service] [ionShutdownHook] com.netflix.discovery.DiscoveryClient : DiscoveryClient_APIGATEWAY-SERVICE/192.168.75.30:apigateway-service:8000 - de-registration failedCannot execute request on any known server com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server 중략... 2024-05-28T23:22:09.420+09:00 INFO 42143 --- [apigateway-service] [ionShutdownHook] com.netflix.discovery.DiscoveryClient : Completed shut down of DiscoveryClient Process finished with exit code 130 (interrupted by signal 2:SIGINT)
jpaRepository에서 update 관련 메서드를 테스트하던 중 고민이 생겼습니다. update로 변경한 결과가 DB가 아닌, 영속성 컨텍스트에만 반영이 되어서 수정된 값을 확인하기 위해 find()메서드로 저장된 객체를 불러오면 수정한 것과 다른 원본 결과가 출력됩니다. 이 문제를 해결하기 위해 두 가지 방법을 생각해보았습니다. 하나는 @Modifying 애노테이션에 clearAutomatically = true 라는 옵션을 달아주는 방법이었는데, 이 방식은 테스트를 위해 프로덕션 코드를 수정하기도 하고 성능에 문제가 발생해서 제외하였고 다른 하나는 테스트 코드에 EntityManager를 이용해 강제로 flush()와 clear()를 이용해 영속성 컨텍스트를 비워주도록 하는 방법이었습니다. 이 방식도 테스트 코드가 깔끔하지 않고 더 jpa에 종속적이게 되는 것 같아서 마음에 들진 않는데 강사님은 어떤 방식으로 해결하셨는지 궁금합니다!
ubuntu@ip-172-31-86-200:~/memberCertification$ ./gradlew clean build Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation. BUILD FAILED in 15s 8 actionable tasks: 8 executed ubuntu@ip-172-31-86-200:~/memberCertification$ ./gradlew clean build > Task :test MemberCertificationApplicationTests > contextLoads() FAILED java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:180 Caused by: org.springframework.beans.factory.BeanCreationException at AbstractAutowireCapableBeanFactory.java:1773 Caused by: org.hibernate.service.spi.ServiceException at AbstractServiceRegistryImpl.java:276 Caused by: org.hibernate.HibernateException at DialectFactoryImpl.java:191 1 test completed, 1 failed > Task :test FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':test'. > There were failing tests. See the report at: file:///home/ubuntu/memberCertification/build/reports/tests/test/index.html * Try: > Run with --scan to get full insights. Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation. BUILD FAILED in 15s 8 actionable tasks: 8 executed ubuntu@ip-172-31-86-200:~/memberCertification$ ./gradlew clean build > Task :test MemberCertificationApplicationTests > contextLoads() FAILED java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:180 Caused by: org.springframework.beans.factory.BeanCreationException at AbstractAutowireCapableBeanFactory.java:1773 Caused by: org.hibernate.service.spi.ServiceException at AbstractServiceRegistryImpl.java:276 Caused by: org.hibernate.HibernateException at DialectFactoryImpl.java:191 1 test completed, 1 failed > Task :test FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':test'. > There were failing tests. See the report at: file:///home/ubuntu/memberCertification/build/reports/tests/test/index.html * Try: > Run with --scan to get full insights. Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation. BUILD FAILED in 14s 8 actionable tasks: 8 executed 구글에 검색해본 결과, java: error: invalid flag: --warning-mode=all을 하면 된다는 글을 보고 Preferences > Compiler > java Compiler에 --warning-mode all --stacktrace 입력을 하고 실행을 해봤습니다. java: error: invalid flag: --warning-mode=all가 발생하며 실행이 되지 않습니다. 어떻게 해야 에러를 고칠 수 있을까요 ?
Description: Parameter 0 of constructor in com.example.membercertification.security.config.SecurityConfig required a single bean, but 2 were found: - authenticationProvider: defined in file [/Users/jjeong/Desktop/study/memberCertification/out/production/classes/com/example/membercertification/security/provider/FormAuthenticationProvider.class] - restAuthenticationProvider: defined in file [/Users/jjeong/Desktop/study/memberCertification/out/production/classes/com/example/membercertification/security/provider/RestAuthenticationProvider.class] This may be due to missing parameter name information Action: Consider marking one of the beans as @Primary, updating the consumer to accept multiple beans, or using @Qualifier to identify the bean that should be consumed Ensure that your compiler is configured to use the '-parameters' flag. You may need to update both your build tool settings as well as your IDE. (See https://github.com/spring-projects/spring-framework/wiki/Upgrading-to-Spring-Framework-6.x#parameter-name-retention) 해당 에러에서 적힌 provider 2개를 @Qualifier와 @Primary로 설정하면 /api에서 로그인 할 경우, 로그인 영속성이 안 되는데 어떻게 해결해야 하나요 ?
instanceof 연산자를 어떤식으로 사용이 되는지는 감이 오는데 실제로 이것이 어떤식으로 구현되어 있는지가 갑자기 궁금해져서 구글링을 해보니 아래와 같은 글이 나오긴 하는데요, java - How is 'instanceof' implemented in the JVM? - Stack Overflow 글만 봐서는 살짝 느낌이 안오는데 조금 더 쉽게 설명된 글이 있을까요?
- name: S3에 프로젝트 폴더 업로드하기 run : aws s3 cp --region 과정을 통해서 압축된 tar.gz 파일은 s3에 저장한다고 이해했는데 따로 압축해제하는 과정이 없어서 질문드립니다. run: aws s3 cp --region ... 다음 S3에 프로젝트 폴더 업로드 하는 과정에서 s3에서 해당 파일을 받고 난 후에 알아서 압축해제를 하는건가요??
insertAdjacentElement 를 사용해서 구현하셨는데 저 부분을 append로 해도 똑같은 결과가 나옵니다. 혹시 append말고 insertAdjacentElement를 사용하신 이유가 있을까요? 개인적으로 검색해봤는데 append와 차이점이 insertAdjacentElement는 '지정한 위치에 요소를 삽입할 수 있다'는 점 이외에는 없더라구요..ㅠ 어떤 장점때문에 insertAdjacentElement 를 사용한지 알고 싶습니다!