묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결도커 쓸 땐 필수! 도커 컴포즈
depends_on 설정
restart 옵션말고, yaml파일에 depends_on 옵션을 주는 건 대안이 안되나요??
-
미해결따라하며 배우는 도커와 CI환경 [2023.11 업데이트]
compose-up mysql 관련 에러 뜨시는 분들
아래가 마주한 에러 및 경고 상황이며, 제가 해결한 방법 공유하는 내용입니다. 1. –initialize specified but the data directory has files in it. Aborting.2. Can't change permissions of the file 'ca-key.pem' 제 개발 운영체제는 다음과 같았습니다. - OS : Windows 10- IDE : VSC- Docker : V 20.10.14- Docker Desktop : 4.7.1 (77678)- Github Reopsitory : https://github.com/unchaptered/22-05-docker-react-proxy 1번 문제 원인 (추정) 1. Docker + MySQL 설정2. Windows 10 / Home 환경일 것3. 어떤 문제로 1번 이상 mysql_data 을 지웠을 경우4. 모든 캐시를 지우고 docker-compose 를 재시작 한 경우 2번 문제 원인 (추정) 1. MySQL v5.7 으로 명시한 분들 1번 Initial 문제 해결방법 / 우려 / 원인 / 참조글 이 포함되어있습니다. [해결방법]docker-compose.yml 파일에서 volume 항목 주석 처리 할 것 [우려]실제로 백앤드 개발환경에서 작업을 하는 경우에는 코드 수정 등으로 테스트를 다시 해야 되는 경우가 있습니다. 또한 개발 기간이 1주만 넘어가도 정크 데이터가 많이 쌓입니다. 이러한 경우 저는 데이터를 지우는 과정을 따로 하는데요.결국 개발 환경에서 Volume 이 주는 사이드 이펙트의 일부가 DB 를 지우는 것이고 크게 문제되지는 않을 것이라고 생각합니다. 실제 저희가 배포하게 될 버저넹서는 RDS 를 사용할 것이기 때문입니다. [원인]MySQL 초기화 과정부터 살펴보면,일반적으로 *.exe 파일로 설치하게 되면 이 부분이 명시적으로 드러나지만, 커맨드 쉘 혹은 컨테이너 등을 거치게 되면 이 부분을 최초에 바로 넣어주고 실행하게 되는 것 같습니다. 그러면 설치 과정에서 환경변수 파일들이 생성되고 사용가능한 상태에 도달하는 것 같습니다. 그 결과로 한번 docker-compose up 을 하고나면 ~/mysql/ 안에 새로운 폴더가 생기는 것을 체크하실 수 있습니다.다만 이 친구의 생성은 volume 옵션과 무관하게 생기는데(옵션을 지워도 생김) 왜 로컬 환경에 파일이 생성되는 지는 알 수 없습니다. 그러한 초기화 환경 에서 강의에서는 volume 옵션을 사용하여 변화가 되는 부분만 실행되게 만들어주신 것 같습니다. 결과적으로 DROP DATABASE IF EXISTS 구문은 수정하지 않을 시에, 실행 되지 않게 되어서 운영환경에서 데이터가 보존되는 것입니다. 문제가 되는 지점은 여기인데요.VOLUME 에 지정된 파일은 docker 가 관리하는 컨테이너 파일이 아니라, 파일 시스템상 디랙토리 로 취급됩니다. 자 그러면 이 부분이 왜 문제가 되었는가 추측을 해보면,특정한 이슈가 있으셔서 컨테이너를 지우고 다시 만든 경우 가 있다고 한다면 아래 세 가지 코드로 깔끔하게 지울 수 있습니다. 1. docker-compose down --volumes2. docker system prune --volumes3. docker rmi $(docker images -q) 이렇게 되면, 이미지/컨테이너/볼륨 이 전부 제거가 되는데요. 이렇게 한 번 제거를 하고 나서 docker-compose up 을 시키고 나면 그떄부터 -initial ~~~ 에러가 지긋지긋하게 저를 따라다닙다. 관련된 내용이 Stackoverflow 에 나와있었으나,솔직히 도커, 리눅스 등에 대한 이해도도 떨어져서 솔루션을 찾을 수 없었습니다. 그러나 강사님께서 제공해주신 교안 파일 및 github repo 를 보면 mysql 은 RDS 를 사용하기 때문에 이러한 문제를 외면해도 되는 것일까 라는 방법을 생각했습니다. 결과적으로 compose-docker.yml 에서 mysql: volume: 항목을 전부 주석 처리해주시면 이 문제가 발생하지 않습니다. [참조글] Stackoverflow - docker-compose volume 에러 (아마도 같은 수강생 분이 남긴 질무닝 아닐까 싶네요 하하)programmerah - Linux error -initialization 에러 2번 문제 [해결방법]mysql: 5.7 을 mysql:5.7.16 으로 명시 [원인]mysql: 5.7 이라고 적게되면,그 뒤에 상세 버전을 가장 최신 으로 설치하게 되는데 그 버전에서 경고 문구가 뜬다는 내용이 있습니다. 혹시 경고 문구가 찜찜하시다면 아래 참조 포스트 혹은 구글링 해보시는 것을 추천드립니다. [참고글]Github Issue - Can't change permissions of the file 'ca-key.pem'
-
미해결도커 쓸 땐 필수! 도커 컴포즈
docker run명령어는 언제 사용하나요?
docker run 명령어를 사용해 여러개의 컨테이너를 띄운다 한들 하나의 port로 맵핑해야되서 사용하지 못하는데, 언제 사용하는지 궁금합니다. 앞단에 로드밸런서 같은? 게 있는 경우에 주로 사용하나요?
-
미해결[NarP Series] MVC 프레임워크는 내 손에 [나프1탄]
webapp에서 member와 classes 말인데요
안녕하세요 수업하실때 경비실 직원에게 홍길동이 몇동 몇호냐고 물어보면 경비실 직원에 member라는 장부를 뒤져서 알려준다고 하셨는데, 그래서 member 폴더의 용도는 저런거구나 하고 이해를 하고 넘어갔는데요 근데 그 뒤에서 classes를 설명하실때 classes에서도 경비실 직원이 장부를 뒤져서 홍길동이 어딨는지를 알려준다는 식으로 말하셔서 둘의 차이가 잘 와닿지가 않네요.. 정확히 어떤 차이인지 더 자세히 알려주실수 있을까요?
-
미해결웹 게임을 만들며 배우는 React
webpack 설정
강사님 강의 좋은 강의 올려주셔서 감사합니다 궁금한게 있는데요 구구단 webpack 따로 야구게임따로 끝말잇기따로 각각 폴더에 webpack 을 설정해야 되는건가요..? 아니면 lecture 폴더하나에 설정해서 공통으로 사용할수 있는건가요..?ㅜㅜ
-
해결됨[리뉴얼] React로 NodeBird SNS 만들기
프론트, 백엔드 서로 다른 도메인 간 쿠키 공유
안녕하세요. 현재 프론트는 mysiteurl.site 라는 도메인으로 firebase 호스팅을 하고 있고 백엔드는 mysiteurl.shop 으로 다른 도메인으로 정할 예정인데요. 강의에선 프론트와 백엔드가 동일하게 nodebird.com 이 들어가 있고 route53에서 서로 다른 ip를 가르키게 했는데 제가 하려고 하는 방식에도 쿠키가 전달이 가능할까요? (nginx proxy_set_header 세팅은 동일하다는 가정)
-
미해결Axure RP 9,10 - 서비스 기획자를 위한 최적의 프로토타이핑 툴
도형 정렬 질문
안녕하세요! 오늘 공부 시작했습니다. 도형 정렬할 때, 첫번째 선택한 위젯을 기준으로 align 한 후에 horizontal이든 vertical이든 distribute할 때마다 위젯들 간격이 일정하게 나오지 않고 겹칩니다. 제가 뭘 놓친 걸까요?
-
미해결작정하고 장고! Django로 Pinterest 따라만들기 : 바닥부터 배포까지
8분30초 질문
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 8분30초정도에 보면 path()안에 뭐뭐 들어가야하는지 박스 생기는데 저거 나오게 하려면 어떻게 해야하나요?
-
해결됨실전! Querydsl
DTO 클래스의 위치? 관련해서 질문 드립니다!
안녕하세요. 강의 너무나 잘 듣고 있어 언제나 감사드립니다. (_ _) DTO 관련해서 궁금점이 있어 질문드립니다. 제가 많이 본, 그리고 제가 지금도 쓰고있는 폴더 트리(패키지 구조)가 아래와 같이 사용하고 있습니다. - Model - | Repository - | Service - | Controller ▼ Service단의 경우에는 다른 서비스단에서 연계해서 사용될 수도 있다고 들은적이 있어서, 최대한 Model 클래스를 반환되도록 사용하고 있구요. 위와 연계해서 Controller단에서 Model 클래스를 DTO로 변환해서 반환을 했습니다. 그래서 DTO의 위치가 Controller 패키지에 위치시키고 있었습니다. 그런데 join 쿼리로 인해서 DTO를 Repository에서 반환하게 된다면, 해당 DTO의 위치가 맨 끝인 Controller 패키지에 있어도 되는 걸까요?
-
미해결프로그래밍 시작하기 : 파이썬 입문 (Inflearn Original)
파이썬 기본환경설정
파이썬 기본환경설정 2-2 강의 setting > install(packages) 에서 'script' 검색해도 결과값이 안나옵니다.
-
미해결[리뉴얼] 처음하는 파이썬 데이터 분석 (쉽게! 전처리, pandas, 시각화 전과정 익히기) [데이터분석/과학 Part1]
plotly 라이브러리 질문
안녕하세요. 강의 잘 듣고 있습니다 :) 가장 빠른 시각화 라이브러리 사용법 이해1 9분 41초 Q1 제가 생각하기론 plotly 라이브러리와 chart_studio는 별개의 라이브러리라고 생각했는데 chart_studio 라이브 러리가 plotly 라이브러리를 포함하고 있는 상위 라이브러리 인가요? import 하실 때 chart_studio.plotly 로 임포트 하셔서 여쭤봅니다. 시각화한 것을 웹상에서도 보여주기 위해 사용하는 것이 chart_studio 라이브러리이고 시각화를 위한 라이브러리는 plotly 라이브러리로서 두 라이브러리는 별개의 라이브러리 아닌가요? Q2 iplot 은 plotly 라이브러리에 속해있는 것이니 호출 시 plotly.iplot 이런 식으로 사용될 줄 알았는데 df.iplot 이런 식으로 iplot 으로 단독 호출이 가능한 이유는 무엇인가요? cufflinks 라이브러리 때문에 가능한 건가요? Q3 10분 54초 cf.go_offline(connected = True) 이 부분은 무엇을 위한 코드인가요? 답변 부탁드립니다. 감사합니다.
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
스프링 데이터 JPA 오류
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]SpringConfig에서 참조를 바꿔주었는데도 SpringDataJpa~~interface를 읽지 못하고 MemoryMemberRepository의 성분을 읽어오는데 이를 어떻게 해결해야할까요?? 추가로 MemberServiceIntegrationTest에서 회원가입과 중복회원예외도 제대로 작동하지 않습니다. 19:37:47.883 [main] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating CacheAwareContextLoaderDelegate from class [org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate] 19:37:47.919 [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)] 19:37:48.027 [main] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating TestContextBootstrapper for test class [hello.hellospring.service.MemberServiceIntegrationTest] from class [org.springframework.boot.test.context.SpringBootTestContextBootstrapper] 19:37:48.055 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Neither @ContextConfiguration nor @ContextHierarchy found for test class [hello.hellospring.service.MemberServiceIntegrationTest], using SpringBootContextLoader 19:37:48.066 [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 19:37:48.068 [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 19:37:48.069 [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}. 19:37:48.071 [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. 19:37:48.201 [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] 19:37:48.389 [main] DEBUG org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider - Identified candidate component class: file [C:\Users\tjfgh\Desktop\spring\hello-spring\src\main\target\classes\hello\hellospring\HelloSpringApplication.class] 19:37:48.412 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Found @SpringBootConfiguration hello.hellospring.HelloSpringApplication for test class hello.hellospring.service.MemberServiceIntegrationTest 19:37:48.743 [main] DEBUG org.springframework.boot.test.context.SpringBootTestContextBootstrapper - @TestExecutionListeners is not present for class [hello.hellospring.service.MemberServiceIntegrationTest]: using defaults. 19:37:48.744 [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] 19:37:48.789 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Using TestExecutionListeners: [org.springframework.test.context.web.ServletTestExecutionListener@50de186c, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener@3f57bcad, org.springframework.test.context.event.ApplicationEventsTestExecutionListener@1e8b7643, org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener@51549490, org.springframework.boot.test.autoconfigure.SpringBootDependencyInjectionTestExecutionListener@71e9ebae, org.springframework.test.context.support.DirtiesContextTestExecutionListener@73d983ea, org.springframework.test.context.transaction.TransactionalTestExecutionListener@36a5cabc, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener@432038ec, org.springframework.test.context.event.EventPublishingTestExecutionListener@7daa0fbd, org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener@42530531, org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestExecutionListener@5a3bc7ed, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestExecutionListener@181e731e, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListener@35645047, org.springframework.boot.test.autoconfigure.webservices.client.MockWebServiceServerTestExecutionListener@6f44a157, org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener@6bc407fd] 19:37:48.796 [main] DEBUG org.springframework.test.context.support.AbstractDirtiesContextTestExecutionListener - Before test class: context [DefaultTestContext@3bd323e9 testClass = MemberServiceIntegrationTest, testInstance = [null], testMethod = [null], testException = [null], mergedContextConfiguration = [WebMergedContextConfiguration@39ac0c0a 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@2bfc268b, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@10163d6, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@247d8ae, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@6c130c45, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@3fb1549b, org.springframework.boot.test.context.SpringBootTestArgs@1, org.springframework.boot.test.context.SpringBootTestWebEnvironment@7225790e], resourceBasePath = 'src/main/webapp', contextLoader = 'org.springframework.boot.test.context.SpringBootContextLoader', parent = [null]], attributes = map['org.springframework.test.context.web.ServletTestExecutionListener.activateListener' -> true]], class annotated with @DirtiesContext [false] with mode [null]. . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v2.6.5) 2022-05-03 19:37:49.636 INFO 19392 --- [ main] h.h.s.MemberServiceIntegrationTest : Starting MemberServiceIntegrationTest using Java 12 on DESKTOP-U5FU35V with PID 19392 (started by tjfgh in C:\Users\tjfgh\Desktop\spring\hello-spring) 2022-05-03 19:37:49.637 INFO 19392 --- [ main] h.h.s.MemberServiceIntegrationTest : No active profile set, falling back to 1 default profile: "default" 2022-05-03 19:37:51.022 INFO 19392 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. 2022-05-03 19:37:51.159 INFO 19392 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 111 ms. Found 1 JPA repository interfaces. 2022-05-03 19:37:52.256 INFO 19392 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default] 2022-05-03 19:37:52.365 INFO 19392 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.6.7.Final 2022-05-03 19:37:52.716 INFO 19392 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.2.Final} 2022-05-03 19:37:54.441 INFO 19392 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... 2022-05-03 19:37:54.593 INFO 19392 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. 2022-05-03 19:37:54.641 INFO 19392 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.SQLServer2012Dialect Hibernate: drop table member Hibernate: create table member (id bigint identity not null, name varchar(255), primary key (id)) 2022-05-03 19:37:55.773 INFO 19392 --- [ main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform] 2022-05-03 19:37:55.787 INFO 19392 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' 2022-05-03 19:37:57.000 WARN 19392 --- [ 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-05-03 19:37:57.629 INFO 19392 --- [ main] o.s.b.a.w.s.WelcomePageHandlerMapping : Adding welcome page: class path resource [static/index.html] 2022-05-03 19:37:58.306 INFO 19392 --- [ main] h.h.s.MemberServiceIntegrationTest : Started MemberServiceIntegrationTest in 9.396 seconds (JVM running for 12.408) 2022-05-03 19:37:58.363 INFO 19392 --- [ main] o.s.t.c.transaction.TransactionContext : Began transaction (1) for test context [DefaultTestContext@3bd323e9 testClass = MemberServiceIntegrationTest, testInstance = hello.hellospring.service.MemberServiceIntegrationTest@788d9139, testMethod = 회원가입@MemberServiceIntegrationTest, testException = [null], mergedContextConfiguration = [WebMergedContextConfiguration@39ac0c0a 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@2bfc268b, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@10163d6, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@247d8ae, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@6c130c45, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@3fb1549b, org.springframework.boot.test.context.SpringBootTestArgs@1, org.springframework.boot.test.context.SpringBootTestWebEnvironment@7225790e], 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@4c7f2fdb]; rollback [true] Hibernate: select member0_.id as id1_0_, member0_.name as name2_0_ from member member0_ where member0_.name=? Hibernate: insert into member (name) values (?) 2022-05-03 19:37:59.177 INFO 19392 --- [ main] o.s.t.c.transaction.TransactionContext : Rolled back transaction for test: [DefaultTestContext@3bd323e9 testClass = MemberServiceIntegrationTest, testInstance = hello.hellospring.service.MemberServiceIntegrationTest@788d9139, testMethod = 회원가입@MemberServiceIntegrationTest, testException = [null], mergedContextConfiguration = [WebMergedContextConfiguration@39ac0c0a 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@2bfc268b, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@10163d6, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@247d8ae, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@6c130c45, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@3fb1549b, org.springframework.boot.test.context.SpringBootTestArgs@1, org.springframework.boot.test.context.SpringBootTestWebEnvironment@7225790e], 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]] 2022-05-03 19:37:59.202 INFO 19392 --- [ionShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default' 2022-05-03 19:37:59.207 INFO 19392 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... 2022-05-03 19:37:59.230 INFO 19392 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed. Process finished with exit code 0
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 기본 강의
bcrypt 쓰는 부분에서 var user = this를 생성하는 이유
bcrypt 쓰는 부분에서 var user = this를 생성하는 이유가 궁금합니다. this가 없이, bcrypt.hash() 부분에 userSchema.password로 입력 시, app.post에서 req.body가 저장되기 전에 값이 불러와지기 때문인걸까요?
-
미해결Slack 클론 코딩[실시간 채팅 with React]
안녕하세요 ! 강의와 관련 없는 질문이지만 답변주시면 감사하겠습니다 :D ..
안녕하세요. 항상 제로초님 강의 들으면서 열심히 공부하고 있는 학생입니다 ! 채팅서비스를 React 를 이용한 모바일 웹으로 한번 만들어 보고 싶은데요, 사진업로드 관련하여 질문이 있습니다 .. ! 카카오톡을 보면 사진 업로드 할 때, 아래 사진처럼 핸드폰 앨범의 이미지가 미리보기 형태로 나오더라구요. native가 아닌 React로도 이런 기능을 구현할 수 있는지 궁금합니다. 가능하다면, 어떤 식으로 접근해야하는지 알려주시면 정말 감사하겠습니다 .. !
-
미해결[개정판] 파이썬 머신러닝 완벽 가이드
feature의 개수가 많을 때
데이터프레임으로 변환시 columns명을 직접 입력하셨는데 만약에 feature값이 너무 많을 경우는 어떻게 해야하나요 ?? 그리고 원핫인코딩된 데이터도 군집화가 가능한것이 맞나요 ??
-
해결됨Firebase 서버를 통한 Android앱 개발 지침서
사진업로드 오류 logcat
2022-05-03 17:49:43.942 26678-26678/com.han.myapplication E/UploadTask: could not locate file for uploading:file:///storage/emulated/0/DCIM/Camera/IMG_20220503_081843.jpg 2022-05-03 17:49:43.944 26678-26678/com.han.myapplication E/StorageException: StorageException has occurred. An unknown error occurred, please check the HTTP result code and inner exception for server response. Code: -13000 HttpResult: 0 2022-05-03 17:49:43.944 26678-26678/com.han.myapplication E/StorageException: /storage/emulated/0/DCIM/Camera/IMG_20220503_081843.jpg: open failed: EACCES (Permission denied) java.io.FileNotFoundException: /storage/emulated/0/DCIM/Camera/IMG_20220503_081843.jpg: open failed: EACCES (Permission denied) 사진 위치 출력문 에선 파일 경로 잘뜨던데 업로드 시키면 저런 오류가 납니다 매니페스트 권한 다 줫고 앱켤떄 수락도 다했는데 왜이럴까요?...ㅠ 또한 oncreatview 에서 requestPermissions(new String[]{Manifest.permission.READ_EXTERNAL_STORAGE},0); READ_EXTERNAL_STORAGE 부분에 빨간색으로 오류가 뜹니다 저는 현재 업로드 코드는 메인엑티비티 위에 프레그먼트 창에 작성하였어요.
-
미해결[C#과 유니티로 만드는 MMORPG 게임 개발 시리즈] Part5: 데이터베이스
SQL ORDER BY
4번 문제를 풀다가 궁금한 점이 생겨서 질문해봅니다. 단지 'BOS'팀의 홈런왕 1명을 구하기만 하면 되는데 SELECT한 전체 테이블을 정렬하는것은 조금 비효율적이라고 생각해서 SORTING 없이 답을 구하는 방법을 찾아보았는데요 이전의 방법으로 홈런왕의 ID를 구해서 저장하고 있다가 홈런왕이 필요하면해당 ID나 인덱스등을 이용하여 직접적으로 구하는것 외에는 딱히 다른 방법을 찾을수 없었습니다. 내부적으로 TOP N 키워드가 들어가있으면 전체 데이터를 정렬하는것이 아니라 최대 N명만 구하는 등 자체적인 최적화가 있는 것인가요 아니면 애초에 이러한 고민이 불필요할 정도로 성능상의 유의미한 차이가 없다 (있다면 그것은 DB 설계 자체의 문제?) 는 것인가요?
-
해결됨[C#과 유니티로 만드는 MMORPG 게임 개발 시리즈] Part2: 자료구조와 알고리즘
배열, 동적 배열의 단점과 C#의 단점 해결법
안녕하세요. 공부하던 중 일부 의야한것이 있어 질문 드립니다. 좀 애매모호한 의문이긴 합니다만 기왕 배우는것 확실하게 알고 싶습니다. 강의에서 배운바로는 배열의 단점은 "방(메모리)의 크기 수정이 불가능" 동적 배열(리스트)의 단점은 "이사 비용의 부담, 중간 삽입과 삭제 어려움" 이라 이해했습니다. 그런데 Resize<T>로 배열의 크기 수정. Insert, RemoveAt으로 리스트의 중간 삽입과 삭제가 쉽게 가능했습니다. 그리고 동적 배열의 이사 횟수를 줄이기 위해 "여유분을 두고 할당한다" 라고 하셨는데 찾아봐도 List<T>에 여유분을 할당하는 기능을 찾을수가 없었습니다. 이러다보니 강의에서 배운 자료구조와 C#의 자료구조 사이에 일종의 괴리감이 생기는것 같습니다. 제가 제시한 단점 해결법(Resize, Insert, RemoveAt)들은 사용이 편할뿐 세부적으론 부담이 심한것인가요? 그리고 리스트에 여유분을 할당하는것은 직접 리스트를 구현하는 경우에만 가능한 것인가요? 답변 부탁드립니다.
-
미해결지옥에서 온 Git
reset에 관하여
"git reset 커밋아이디 --hard" 를 통해 버전을 되돌린 경우도 복구할 수 있나요?
-
미해결따라하며 배우는 도커와 CI환경 [2023.11 업데이트]
no such file or directory, open '/app/package.json'
### 한줄 요약 개별 컨테이너 에서는 build, run 이 정상적으로 되며, package.json 이 존재하지만docker-compose 로 실행할 경우에만 package.json 을 찾을 수 없다는 에러가 발생 # System OS : Windows 10IDE : VSCDocker : V 20.10.14Docker Desktop : 4.7.1 (77678)Github Reopsitory : https://github.com/unchaptered/22-05-docker-react-proxy ### 발생한 에러 docker-compose up / docker-compose up --build 시,backend, frontend 모두 /app/package.json 을 찾을 수 없다는 에러 발생. ### 예상되는 원인 0. Dockerfile 등에서 오탈자 있는 경우1. package.json 이 없는 경우2. package.json 이 있는데 잘못된 경로로 연결을 시도한 경우 ### 0번 확인 Dockerfile, yml, conf 에서 유의미한 옽라자를 찾을 수 없었습니다.관련하여 깃허브 레포 업로드해두겠습니다. ### 1번 확인 알 수 없는 이유로 docker-compose 의 빌드 후 실행이 되지 않았습니다.따라서 backend, frontend 컨테이너를 개별적으로 확인해야 했습니다. Backend 확인 결과 : 5000 포트에서 정상 실행 되었으나, MySQL 연결 실패 에러 발생 (compose 에러와 무관한 내용이라서 무시해도 될 것 같다고 생각했습니다.)0. (root 디렉토리)1. cd backend2. docker build -f Dockerfile.dev -t nchaptered/test-docker ./3. docker run unchaptered/test-docker4. docker exec -it 컨테이너_ID sh5. ls6. cat package.json Frontend 확인 결과 : 3000 포트에서 정상 실행 되었습니다. 0. (root 디렉토리)1. cd frontend2. docker build -f Dockerfile.dev -t unchaptered/test-docker-f ./3. docker run unchaptered/test-docker-f4. docker exec -it 컨테이너_ID sh5. ls6. cat package.json ### 2번 확인 1. docker-compose up --build2. Running 5/5/ build 정상 실행 - Network 22-05-docker-multi-react_default Created - Container app_backend Created - Container app_frontend Created - Container app_mysqlA Created - Container app_nginx Created 3. Attaching to app_backend, app_frontend, app_mysqlA, app_nginx - app_backend Error 254 : erno -2 no such file or directory, open '/app/package.json' - app_frontend Error 254 : erno -2 no such file or directory, open '/app/package.json' - app_mysqlA Success : ready to connection, Version '5.7.38' - app_nginx 결국은 빌드는 되는데 실행이 안되는 것 같습니다. 그 이유가 /app/package.json 인 데, 애초에 실행이 안되니 exec -it 컨테이너명 sh 으로 확인이 불가능한 상태입니다. 해당 부분에서 어떤 방식으로 접근 해야 할지 알려주시면 감사하겠습니다.