묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결스프링 핵심 원리 - 기본편
@Configuration 에 대해
안녕하세요 영한님 요즘 할게 좀 많아서 추석이후로 강의 못듣다가 오늘 듣게됐는데 너무 재밌고 행복하고 힐링하고 있습니다! 이전 강의에서 싱글턴 이슈 때문에 터진 에피소드도 너무 재밌었어요! 기회되면 멀티스레드와 같은 사이드 한 주제들을 모은 그런 강의도 듣고싶네요!! 이번 강의에서 @Configuration에 대해서 학습했는데, 이 놈이 싱글턴 환경을 보장해주는 어노테이션인 것을 알게됐는데, 그렇다면 오직 싱글턴 패턴의 환경을 만들어주기 위함이 주된 목적으로 쓰이는 어노테이션이라고 받아들여도 되는건지 궁금합니다.
-
미해결따라하며 배우는 도커와 CI환경 [2023.11 업데이트]
도커 배포 방식 문의 - 섹션 9. 복잡한 어플을 실제로 배포해보기
강사님 강의 잘 봤습니다. 복잡한 어플 실제 배포해보기를 보다 보니, Travis CI 에서 운영환경 도커 이미지를 빌드해서 도커허브에 push 를 해놓고, AWS Elastic Beanstalk 에서는 결국 도커허브 이미지를 사용하지 않고, 7강 리액트앱 배포할 때와 동일한 방식으로 EB 환경에서 도커를 빌드하는 방식을 사용한 것 같습니다. 제가 이해한 부분이 맞는지요. 그렇다면 도커허브에서 이미지를 pull 받아 EB 환경에 배포하는 방식으로 동영상 강의가 변경되어야 할 것 같습니다. 감사합니다.
-
해결됨실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
Member 테이블이 생성되지 않습니다..
Member 테이블이 생성되지 않습니다.. 21:59:04.275 [main] DEBUG org.springframework.test.context.junit4.SpringJUnit4ClassRunner - SpringJUnit4ClassRunner constructor called with [class jpabook.jpashop.MemberRepositoryTest] 21:59:04.279 [main] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating CacheAwareContextLoaderDelegate from class [org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate] 21:59:04.288 [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)] 21:59:04.307 [main] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating TestContextBootstrapper for test class [jpabook.jpashop.MemberRepositoryTest] from class [org.springframework.boot.test.context.SpringBootTestContextBootstrapper] 21:59:04.324 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Neither @ContextConfiguration nor @ContextHierarchy found for test class [jpabook.jpashop.MemberRepositoryTest], using SpringBootContextLoader 21:59:04.328 [main] DEBUG org.springframework.test.context.support.AbstractContextLoader - Did not detect default resource location for test class [jpabook.jpashop.MemberRepositoryTest]: class path resource [jpabook/jpashop/MemberRepositoryTest-context.xml] does not exist 21:59:04.328 [main] DEBUG org.springframework.test.context.support.AbstractContextLoader - Did not detect default resource location for test class [jpabook.jpashop.MemberRepositoryTest]: class path resource [jpabook/jpashop/MemberRepositoryTestContext.groovy] does not exist 21:59:04.328 [main] INFO org.springframework.test.context.support.AbstractContextLoader - Could not detect default resource locations for test class [jpabook.jpashop.MemberRepositoryTest]: no resource found for suffixes {-context.xml, Context.groovy}. 21:59:04.329 [main] INFO org.springframework.test.context.support.AnnotationConfigContextLoaderUtils - Could not detect default configuration classes for test class [jpabook.jpashop.MemberRepositoryTest]: MemberRepositoryTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. 21:59:04.379 [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 [jpabook.jpashop.MemberRepositoryTest] 21:59:04.471 [main] DEBUG org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider - Identified candidate component class: file [E:\공부\JPA\jpa_활용_1\project\jpashop\out\production\classes\jpabook\jpashop\JpashopApplication.class] 21:59:04.477 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Found @SpringBootConfiguration jpabook.jpashop.JpashopApplication for test class jpabook.jpashop.MemberRepositoryTest 21:59:04.641 [main] DEBUG org.springframework.boot.test.context.SpringBootTestContextBootstrapper - @TestExecutionListeners is not present for class [jpabook.jpashop.MemberRepositoryTest]: using defaults. 21:59:04.642 [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.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.support.DependencyInjectionTestExecutionListener, org.springframework.test.context.support.DirtiesContextTestExecutionListener, org.springframework.test.context.transaction.TransactionalTestExecutionListener, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener] 21:59:04.657 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Using TestExecutionListeners: [org.springframework.test.context.web.ServletTestExecutionListener@35a3d49f, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener@389b0789, org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener@13d9cbf5, org.springframework.boot.test.autoconfigure.SpringBootDependencyInjectionTestExecutionListener@478db956, org.springframework.test.context.support.DirtiesContextTestExecutionListener@6ca18a14, org.springframework.test.context.transaction.TransactionalTestExecutionListener@c667f46, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener@51bd8b5c, org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener@7b50df34, org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestExecutionListener@1b410b60, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestExecutionListener@2462cb01, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListener@19b843ba, org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener@64ec96c6] 21:59:04.659 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [jpabook.jpashop.MemberRepositoryTest] 21:59:04.660 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [jpabook.jpashop.MemberRepositoryTest] 21:59:04.668 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [jpabook.jpashop.MemberRepositoryTest] 21:59:04.668 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [jpabook.jpashop.MemberRepositoryTest] 21:59:04.669 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [jpabook.jpashop.MemberRepositoryTest] 21:59:04.670 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [jpabook.jpashop.MemberRepositoryTest] 21:59:04.670 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [jpabook.jpashop.MemberRepositoryTest] 21:59:04.670 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [jpabook.jpashop.MemberRepositoryTest] 21:59:04.674 [main] DEBUG org.springframework.test.context.support.AbstractDirtiesContextTestExecutionListener - Before test class: context [DefaultTestContext@463fd068 testClass = MemberRepositoryTest, testInstance = [null], testMethod = [null], testException = [null], mergedContextConfiguration = [WebMergedContextConfiguration@895e367 testClass = MemberRepositoryTest, locations = '{}', classes = '{class jpabook.jpashop.JpashopApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@34e9fd99, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@6a6cb05c, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@22ff4249, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@662ac478], 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]. 21:59:04.675 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [jpabook.jpashop.MemberRepositoryTest] 21:59:04.675 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [jpabook.jpashop.MemberRepositoryTest] 21:59:04.697 [main] DEBUG org.springframework.test.context.support.TestPropertySourceUtils - Adding inlined properties to environment: {spring.jmx.enabled=false, org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true, server.port=-1} . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v2.1.17.RELEASE) 2020-10-15 21:59:05.202 INFO 30540 --- [ main] jpabook.jpashop.MemberRepositoryTest : Starting MemberRepositoryTest on DESKTOP-J3IVAOF with PID 30540 (started by jeng8 in E:\공부\JPA\jpa_활용_1\project\jpashop) 2020-10-15 21:59:05.208 INFO 30540 --- [ main] jpabook.jpashop.MemberRepositoryTest : No active profile set, falling back to default profiles: default 2020-10-15 21:59:06.431 INFO 30540 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. 2020-10-15 21:59:06.454 INFO 30540 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 14ms. Found 0 JPA repository interfaces. 2020-10-15 21:59:07.165 INFO 30540 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... 2020-10-15 21:59:07.365 INFO 30540 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. 2020-10-15 21:59:07.482 INFO 30540 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [ name: default ...] 2020-10-15 21:59:07.584 INFO 30540 --- [ main] org.hibernate.Version : HHH000412: Hibernate Core {5.3.18.Final} 2020-10-15 21:59:07.586 INFO 30540 --- [ main] org.hibernate.cfg.Environment : HHH000206: hibernate.properties not found 2020-10-15 21:59:07.764 INFO 30540 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.0.4.Final} 2020-10-15 21:59:08.366 INFO 30540 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect 2020-10-15 21:59:08.961 DEBUG 30540 --- [ main] org.hibernate.SQL : drop table member if exists 2020-10-15 21:59:08.963 DEBUG 30540 --- [ main] org.hibernate.SQL : drop sequence if exists hibernate_sequence 2020-10-15 21:59:08.965 DEBUG 30540 --- [ main] org.hibernate.SQL : create sequence hibernate_sequence start with 1 increment by 1 2020-10-15 21:59:08.967 DEBUG 30540 --- [ main] org.hibernate.SQL : create table member ( id bigint not null, username varchar(255), primary key (id) ) 2020-10-15 21:59:08.974 INFO 30540 --- [ main] o.h.t.schema.internal.SchemaCreatorImpl : HHH000476: Executing import script 'org.hibernate.tool.schema.internal.exec.ScriptSourceInputNonExistentImpl@4b9f7edc' 2020-10-15 21:59:08.976 INFO 30540 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' 2020-10-15 21:59:09.643 INFO 30540 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor' 2020-10-15 21:59:09.698 WARN 30540 --- [ main] aWebConfiguration$JpaWebMvcConfiguration : 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 2020-10-15 21:59:09.744 INFO 30540 --- [ main] o.s.b.a.w.s.WelcomePageHandlerMapping : Adding welcome page: class path resource [static/index.html] 2020-10-15 21:59:10.111 INFO 30540 --- [ main] jpabook.jpashop.MemberRepositoryTest : Started MemberRepositoryTest in 5.403 seconds (JVM running for 6.585) 2020-10-15 21:59:10.212 INFO 30540 --- [ main] o.s.t.c.transaction.TransactionContext : Began transaction (1) for test context [DefaultTestContext@463fd068 testClass = MemberRepositoryTest, testInstance = jpabook.jpashop.MemberRepositoryTest@6d5de79a, testMethod = testMemeber@MemberRepositoryTest, testException = [null], mergedContextConfiguration = [WebMergedContextConfiguration@895e367 testClass = MemberRepositoryTest, locations = '{}', classes = '{class jpabook.jpashop.JpashopApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@34e9fd99, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@6a6cb05c, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@22ff4249, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@662ac478], 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]]; transaction manager [org.springframework.orm.jpa.JpaTransactionManager@749ee0e3]; rollback [false] 2020-10-15 21:59:10.294 DEBUG 30540 --- [ main] org.hibernate.SQL : call next value for hibernate_sequence 2020-10-15 21:59:10.367 DEBUG 30540 --- [ main] org.hibernate.SQL : insert into member (username, id) values (?, ?) 2020-10-15 21:59:10.375 INFO 30540 --- [ main] o.s.t.c.transaction.TransactionContext : Committed transaction for test: [DefaultTestContext@463fd068 testClass = MemberRepositoryTest, testInstance = jpabook.jpashop.MemberRepositoryTest@6d5de79a, testMethod = testMemeber@MemberRepositoryTest, testException = [null], mergedContextConfiguration = [WebMergedContextConfiguration@895e367 testClass = MemberRepositoryTest, locations = '{}', classes = '{class jpabook.jpashop.JpashopApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@34e9fd99, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@6a6cb05c, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@22ff4249, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@662ac478], 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]] 2020-10-15 21:59:10.383 INFO 30540 --- [ Thread-1] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor' 2020-10-15 21:59:10.383 INFO 30540 --- [ Thread-1] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default' 2020-10-15 21:59:10.386 INFO 30540 --- [ Thread-1] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... 2020-10-15 21:59:10.395 INFO 30540 --- [ Thread-1] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed. Process finished with exit code 0
-
미해결실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
컬렉션은 필드에서 초기화 하자 뜻을 자세히 이해 못했습니다...
em.persist(member); 이후 하이버네이트의 내장 컬렉션으로 변경하는건 이해했습니다. 필드레벨에서만 생성한다는 것은 필드 레벨에서 객체 선언만할 뿐 메서드를 사용하면 안 된다. 제가 이해 한게 맞나요....ㅜㅜㅜ 필드 레벨은 영속화가 이루어지는 파일을 뜻하는게 맞나요..? 쉬운 내용인데 귀찮게 해드리는 거 같아 죄송합니다ㅠㅠㅠ
-
미해결쉽고 자연스럽게 배워보는 Javascript 입문 - 코드스쿼드 마스터즈 코스 레벨1
'변수 이름 잘 짓기'가 코딩 3대 난제라면 나머지 두 개는 뭘까요??(내용무)
-
-
해결됨레트로의 유니티 C# 게임 프로그래밍 에센스
오류표시선이 안틉니다.
삭제된 글입니다
-
미해결파이썬 무료 강의 (기본편) - 6시간 뒤면 나도 개발자
리스트로 값 할당 한 후에
clear함수로 값을 지워주면 값을 담고 있었던 공간도 같이 사라지나요? 아니면 그대로 할당되어있나요?
-
미해결[개정판] 딥러닝 컴퓨터 비전 완벽 가이드
optimize-anchors 문의
안녕하세요. 매번 초보적인 질문인듯 하여 부끄럽지만 또 문의 드립니다. 앵커박스를 최적화하는 코드를 알려주시는 부분에서 관련된 github으로 이동했더니 업데이트가 되어 있더군요. 업데이트로 인해 폴더 구조도 조금 변경되었더라구요. 요점은 그냥 업데이트 된 상태 그대로 클론해서 설치하고 최종적으로 python ~으로 실행을 시켰는데 아래와 같은 오류 메세지가 발생하네요.
-
미해결[리뉴얼] 파이썬입문과 크롤링기초 부트캠프 [파이썬, 웹, 데이터 이해 기본까지] (업데이트)
뉴스 크롤링 코드 관련 문의합니다.
크롤링하기 수업을 듣는 중에 크롤링을 하는 과정에서 import requests from bs4 import BeautifulSoup res=requests.get('http://www.hani.co.kr/arti/society/health/965832.html') soup=BeautifulSoup(res.content,'html.parser') data=soup.find('h4') data.get_text() 결과가 \n\n코로나19 신규 확진자 110명…요양병원 집단감염 영향\n\n' 글자 옆에 돈표시같은게 같이 나와서 import requests from bs4 import BeautifulSoup res=requests.get('http://www.hani.co.kr/arti/society/health/965832.html') soup=BeautifulSoup(res.content,'html.parser') data=soup.find('span', 'title') data.get_text() 하니까 '코로나19 신규 확진자 110명…요양병원 집단감염 영향' 으로 나오는데요. h4와 span의 차이가 궁금합니다. 크롤링한 뉴스 html이미지로 첨부합니다. 크롤링한 뉴스url입니다. http://www.hani.co.kr/arti/society/health/965832.html 그리고 뉴스의 텍스트 추출하는 과정에서 import requests from bs4 import BeautifulSoup res=requests.get('http://www.hani.co.kr/arti/society/health/965832.html') soup=BeautifulSoup(res.content,'html.parser') mydata=soup.find('div', 'text') mydata.get_text() 이렇게 했는데 아무것도 안뜹니다. 왜 아무것도 안뜰까요? 오류메시지도 안뜨고 아무것도 안떠요
-
실전! 스프링 데이터 JPA
postman으로 테스트 시 접근권한 설정에 대해
삭제된 글입니다
-
미해결자바스크립트 비기너: 튼튼한 기본 만들기
강의 내용 관련하여 질문사항입니다!
안녕하세요. 이직을 준비하면서 기본기를 다지기 위해서 강의를 결제하여 듣고있는 학생입니다. 혹시 해당 내용을 공부하면서 제 벨로그에 기재하여도 될까요?? 상업적인 목적이 아닌 순수하게 저의 공부를 기록해두는 목적입니다. 답변 부탁드리겠습니다^^ 감사합니다.
-
미해결실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
원초적인게 궁금합니다
1. em.find(Member.class, id) 부분에서 Member.class는 Member 클래스 자체를 반환하는 건가요?? 2. member 객체에 username만 저장된 상태애서 save메서드를 실행시킴으로써 id가 반환되고 반환된 id로 find메서드를 통해 findMember 객체에 id에 해당되는 정보를 넘겨줍니다. 제가 이해한게 맞나요??
-
해결됨[리뉴얼] React로 NodeBird SNS 만들기
nextjs 사이클방식이 헷갈립니다.
제로초님 nextjs 사이클이 헷갈려서 질문 드려도 될까요??? 함수형 컴포넌트에서 return 전에 함수 또는 변수는 serverd와 브라우저 둘다 실행되는 건가요?? (useEffect함수는 브라우저에서만 실행되는걸로 알고 있습니다 하지만 커스텀으로 만든 함수는 서버에서도 실행되는것 같더라구요) 어떤건 브라우저 서버 둘다 실행되고 어떤건 서버만 또는 브라우저만 실행되는거 같아 헷갈립니다...ㅠ
-
미해결자바 ORM 표준 JPA 프로그래밍 - 기본편
@Embeddable 사용시 질문 입니다.
안녕하세요 강사님 @Embeddable 어노테이션 관련 부분을 실습 하고 있는데요 @Getter@Setter@Embeddablepublic class Ex18Period {// @Column(name = "STARTDATE") private LocalDateTime startDate; private LocalDateTime endDate; public Ex18Period() { } public Ex18Period(LocalDateTime startDate, LocalDateTime endDate) { this.startDate = startDate; this.endDate = endDate; } public boolean isWork(){ return startDate.isAfter(endDate); }} 위와 같이 코드를 구성하고 실습 중입니다. 빌드 및 테이블 생성은 모두 잘 되고 있는데 인텔리 J에서 메서드 이름에 에러를 표시하고 있어서요; 에러 문구 For property-based access both setter and getter should be present 관련되서 찾아 보았는데 Preferences -> Editor -> Inspections -> JPA 검색 후 Persistent attribute signature checks 옵션을 체크 해제 하면 더 이상 에러 메시지는 출력 되지 않습니다. 이렇게 하면 에러 메시지가 출력이 되지 않더라구요 인텔리J Persistent attribute signature checks 디스크립션을 보면 아래와 같이 설명 되어 있구요 This inspection checks for the following JPA specification errors: More than one attribute configured for method/field Attribute cannot be used in Embeddable object (JPA 1.0) Persistent attribute metadata should be specified on field or property getter For property-based access both setter and getter should be present 실행은 잘 되고 메소드 호출도 잘 되는데; IDE에서 저렇게 메시지를 출력해 주는데 혹시 강사님도 똑같이 발생하시나요? 혹시 해당 메시지가 문제가 있는것은 아닌지 궁금하기도 해서 문의 드려 봅니다. 제가 사용하는 인텔리J 버전은 아래와 같습니다. IntelliJ IDEA 2020.1.4 (Ultimate Edition) Build #IU-201.8743.12, built on July 21, 2020
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
데이터베이스에서 받아온 데이터를 to.JSON() 다시 감싸는 이유가 무엇인가요?
데이터베이스에서 가져온 데이터를 다시 to.JSON 메서드에 감싸는 이유는 무엇인가요?? 그리고 to.JSON 메서드가 정확히 어떤 역할을 하는지 궁금합니다.
-
해결됨[리뉴얼] React로 NodeBird SNS 만들기
reducer에 ADD_COMMENT_SUCCESS 부분 코드가 실행이안되는데요
댓글입력창에서 입력하고 삐약버튼누르면 계속 로딩중으로 떠서 콘솔 찍어보니 위의 부분에서 에러가 뜨는것같습니다. 해당코드를 주석처리하면 콘솔에 '실행완료'가 뜨는데 주석풀면 안뜨고요 에러 내용은 이렇게 뜨는데 혹시 어떤게 문제인지 알수있을까요,,? 어제부터 고통받고있습니다 ㅠ
-
미해결파이썬 알고리즘 문제풀이 입문(코딩테스트 대비)
공주구하기
공주구하기 문제에 대해 질문있습니다. 저는 강사님과 조금 다르게 풀었습니다. input_list에 들어있는 요소의 개수가 k보다 작을 때, k가 짝수라면 input_list[1]이 답이 되고 k가 홀수라면 input_list[-1]이 답이 되는 규칙을 찾았습니다. 임의의 예시를 만들어 해당 규칙을 적용시켜보니, 모든 사례에 이 규칙이 성립하는 것을 발견하였습니다. 해당 규칙을 토대로 알고리즘을 작성하여 채점기를 돌려보았는데, in3.txt에 대해서만 wrong answer를 유발합니다. 제가 찾은 규칙이 잘못된 것인지, 아니면 코드의 다른 부분에 문제가 있는지 궁금합니다. 자세한 답변 부탁드립니다. 감사합니다. import sys sys.stdin = open(r"C:\Users\my\Desktop\Documents\파이썬 알고리즘 문제풀이(코딩테스트 대비)\섹션 5\5. 공주구하기\in3.txt") n, k = list(map(int, input().split())) input_list = list(range(1, n + 1)) def save_princess(input_list, k): while True: if len(input_list) >= k: input_list.pop(k-1) for i in range(k-1): input_list.append(input_list.pop(0)) else: if k % 2 == 0: result = input_list[1] print(result) break else: result = input_list[-1] print(result) break save_princess(input_list, k)
-
미해결초보자도 만들 수 있는 스크롤 인터렉션. 1편 자바스크립트
왜 data 값을 못 찾는 걸까요?
강의를 보고 이해한거 토대로 직접 코드를 작성해보았는데요. 다 맞게 작성한 것 같은데 무한스크롤이 안됩니다.ㅠㅠ 로그를 찍어보니 data 변수가 제대로 선언되지 않은 것 같은데 왜 그런걸까요?... 선언하는 위치상으로도 문제가 없는 것 같은데 왜 안되는지 도통 모르겠네요 ㅠㅠ <!doctype html> <html lang="ko"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-compatible" content="chrome=1,IE=edge"> <title>깡코딩 - 초보자도 만들 수 있는 스크를인터렉션1편</title> <link rel="stylesheet" type="text/css" href=""> <link rel="stylesheet" type="text/css" href="../../library/css/common.css"> <script type="text/javascript" src="../../library/js/jquery.1.12.4.js"></script> </head> <style type="text/css"> .com_tit {margin:100px 0 80px; font-size:70px; text-align: center;} .sc_infinity {} .sc_infinity .list {} .sc_infinity .list:after {clear:both; display:block; content:'';} .sc_infinity .list li {float:left; width:25%;} .sc_infinity .list li figure {padding:10px;} .footer {height:200px; background-color: #ddd;} .footer p {padding:50px 20px;} </style> <body> <div class="wrap"> <section class="sec01"> <h2 class="com_tit">INFINITE SCROLL</h2> <article class="sc_infinity"> <ul class="list"> <li> <figure> <img src="../images/1.jpg"> </figure> </li> <li> <figure> <img src="../images/2.jpg"> </figure> </li> <li> <figure> <img src="../images/3.jpg"> </figure> </li> <li> <figure> <img src="../images/1.jpg"> </figure> </li> <li> <figure> <img src="../images/2.jpg"> </figure> </li> <li> <figure> <img src="../images/3.jpg"> </figure> </li> </ul> </article> <div class="footer"> <p>FOOTER</p> </div> </section> </div> <script> $(function(){ var target = $('.list'), winTop = $(window).scrollTop(), onTop = $(document).height() - $(window).height() - $('.footer').height(), breakList = 10, listCount = 0; function getList(){ var list; listCount++; if(listCount > breakList){ list = null; } else{ list = '<li><figure><img src="../images/1.jpg"></figure></li>'; list += '<li><figure><img src="../images/2.jpg"></figure></li>'; list += '<li><figure><img src="../images/3.jpg"></figure></li>'; } return list; } function listCall(){ if(winTop >= onTop){ var data = getList(); if(data !== null){ target.append(data); } else{ return false; } } } console.log(data); $(window).scroll(function(){ listCall(); }); function init(){ listCall(); } init(); }); </script> </body> </html>
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
제로초님 제가 블로그를 타입스크립트와 next.js로 만들려고하는데요
안녕하십니까 !! 제가 개인 블로그를 제로초님의 교육 덕분에 만들긴 만들었습니다. 그런데 cra를 이용해서 만들었어서 몇일 전에 배포하고 난 뒤 조금 아쉬운거 같아서 이번에는 제대로 typescript와 next.js로 만들어서 다시 배포하려고합니다.!! 그런데 next의 여기 리듀서 설정하는 곳에서 좀 헷갈려서 질문을 드립니다. import { HYDRATE } from 'next-redux-wrapper'; import { combineReducers } from 'redux'; import user from './user' const rootReducer = combineReducers({ index: (state: {} = {}, action) => { switch (action.type) { case HYDRATE: return { ...state, ...action.payload }; default: return state; } }, user }); export type RootState = ReturnType<typeof rootReducer> export default rootReducer; 제가 검색을 해보아도 원하는 답이 안나와서 그런데 혹시 여기서 고칠점이 있나요?? 감사합니다.!!
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
editable 구현 관련 문의 드립니다.
antd 의 테이블 구현 관련 궁금한 부분을 문의 드리고 싶습니다. antd 의 EditableTable, ResizableTitle, infinite scroll(react)를 적용해 보려하고 있습니다. 1. 테이블 헤드 가로 사이즈 변경이 먹지 않습니다. (예제 코드를 약간 변경해서 적용했습니다.) 2. 편집시 <td> padding과 Edit button 클릭시 td 안에 <input> padding 을 유지시 셀의 세로 높이가 바뀌는 문제가 있어서 Edit button 클릭시에도 동일하게 padding를 유지하도록 <td> className을 주어 padding를 주려고 합니다. 어느 부분이 잘못되어 있는지 코드 체크 부탁드립니다. // import { VariableSizeGrid as Grid } from 'react-window'; // import ResizeObserver from 'rc-resize-observer'; // import classNames from 'classnames'; import React, { useState, useEffect, useRef } from 'react'; import { Resizable } from 'react-resizable'; import { Table, Input, InputNumber, Popconfirm, Form } from 'antd'; import styled, { createGlobalStyle } from 'styled-components'; const Global = createGlobalStyle` .editable-row, .ant-form-item-explain { position: absolute; top: 100%; font-size: 12px; } table thead tr th { height: 10px;} table tbody tr th { height: 10px;} .editable row { height: 10px;} #components-table-demo-resizable-column .react-resizable { position: relative; background-clip: padding-box; } #components-table-demo-resizable-column .react-resizable-handle { position: absolute; right: -5px; bottom: 0; z-index: 1; width: 10px; height: 100%; cursor: col-resize; } .antd-table > tr > td { padding: 0; } .antd-form-control-input-content > input { padding: 11px 11px; } `; const originData = []; for (let i = 0; i < 100; i++) { originData.push({ key: i.toString(), name: `Edrward ${i}`, age: i, address: `London Park no. ${i}`, // description: name + ' ' + age +' '+ address, }); } const ResizableTitle = props => { const { onResize, width, ...restProps } = props; if (!width) { return <th {...restProps} />; } return ( <Resizable width={width} height={0} handle={ <span className="react-resizable-handle" onClick={e => { e.stopPropagation(); }} /> } onResize={onResize} draggableOpts={{ enableUserSelectHack: false }} > <th {...restProps} /> </Resizable> ); }; const EditableCell = ({ editing, dataIndex, title, inputType, record, index, children, ...restProps }) => { const inputNode = inputType === 'number' ? <InputNumber /> : <Input />; return ( ======================================== {editing ? ( <td {...restProps} className="padding0"> <Form.Item name={dataIndex} style={{ margin: 0, }} rules={[ { required: true, message: `Please Input ${title}!`, }, ]} > {inputNode} </Form.Item> </td> ) : ( <td {...restProps}> children </td> ) } ); }; ============================================ const EditableTable = () => { const [form] = Form.useForm(); const [data, setData] = useState(originData); const [editingKey, setEditingKey] = useState(''); const isEditing = (record) => record.key === editingKey; const edit = (record) => { form.setFieldsValue({ name: '', age: '', address: '', ...record, }); setEditingKey(record.key); }; const cancel = () => { setEditingKey(''); }; const save = async (key) => { try { const row = await form.validateFields(); const newData = [...data]; const index = newData.findIndex((item) => key === item.key); if (index > -1) { const item = newData[index]; newData.splice(index, 1, { ...item, ...row }); setData(newData); setEditingKey(''); } else { newData.push(row); setData(newData); setEditingKey(''); } } catch (errInfo) { console.log('Validate Failed:', errInfo); } }; const columns = [ { title: 'name', dataIndex: 'name', width: 100, editable: true, sorter: (a, b) => a.name.length - b.name.length, }, { title: 'age', dataIndex: 'age', width: 80, editable: true, sorter: (a, b) => a.age - b.age, }, { title: 'address', dataIndex: 'address', width: 200, editable: true, sorter: (a, b) => a.address.length - b.address.length, }, { title: 'operation', dataIndex: 'operation', render: (_, record) => { const editable = isEditing(record); return editable ? ( <span> <a href="javascript:;" onClick={() => save(record.key)} style={{ marginRight: 8, }} > Save </a> {/* <Popconfirm title="Sure to cancel?" onConfirm={cancel}> <a>Cancel</a> </Popconfirm> */} <a href="javascript:;" onClick={cancel} style={{ marginRight: 8 }}> Cancel </a> </span> ) : ( <a disabled={editingKey !== ''} onClick={() => edit(record)}> Edit </a> ); }, }, ]; const handleResize = index => (e, { size }) => { this.setState(({ columns }) => { const nextColumns = [...columns]; nextColumns[index] = { ...nextColumns[index], width: size.width, }; return { columns: nextColumns }; }); }; const mergedColumns = columns.map((col, index) => { if (!col.editable) { return col; } return { ...col, onHeaderCell: column => ({ width: column.width, onResize: handleResize(index), }), onCell: (record) => ({ record, inputType: col.dataIndex === 'age' ? 'number' : 'text', dataIndex: col.dataIndex, title: col.title, editing: isEditing(record), }), }; }); const onChange = (pagination, filters, sorter, extra) => { console.log('params', pagination, filters, sorter, extra); } return ( <Form form={form} component={false}> <Table components={{ header: { cell: ResizableTitle, }, body: { cell: EditableCell, }, }} expandable={{ expandedRowRender: record => <p style={{ margin: 0 }}>{record.description}</p>, rowExpandable: record => record.name !== 'Not Expandable', }} bordered dataSource={data} columns={mergedColumns} rowClassName="editable-row" onChange={onChange} scroll={{ y: 400 }} pagination={false} /> </Form> ); }; export default EditableTable;