학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) [질문 내용] 여기에 질문 내용을 남겨주세요. 회원 이메일을 사용하여 MemberRepository에서 회원 정보를 조회하는 메서드를 구현해 보았습니다. 해당 이메일의 회원이 DB에 존재하지 않을경우를 고려하여 다음과 같이 Optional로 감싸주었습니다. Transactional(readOnly = true) public interface MemberRepository extends JpaRepository<Member, Long> { Optional<Member> findByEmail(String email); ... } 이 경우 Service 단에서 해당 메서드를 사용할 경우 변수 타입을 Optional<Member>로 선언해 줘야 했습니다. @Transactional public void followFriend(FollowFriendRequest request) { Member requester = getMember(request.getRequesterEmail()); Optional<Member> receiver = memberRepository.findByEmail(request.getReceiverEmail()); log.info("requester: '{}', receiver: '{}'", requester, receiver); if (receiver == null) { throw new MemberEmailNotFound(); } if (requester.hasFriend(receiver) || relationRepository.existsByOwnerEmailAndFriendEmail(request.getRequesterEmail(), request.getReceiverEmail())) { throw new EmailDuplicatedException(request.getReceiverEmail()); } relationRepository.save(new Relation(requester, receiver)); } 이러면 위 코드 마지막 줄의 Relation 생성자 또한 Optional을 포함한 생성자를 추가로 만들어 줘야 하고 이렇게 되면 Relation 엔티티의 receiver 필드값에도 Optional을 씌워줘야 하는 문제가 발생했습니다. 이 경우 Optional을 어떻게 사용하는게 옳은건지 궁금합니다.
안녕하세요! 터미널에서 remixd -s ~ 로 리믹스 실행하려고 하는데 계속 오류가 뜹니다 ㅜㅜ 해결방법을 찾아봐도 딱히 방법을 못찾겠어서 질문드립니다..! C:\Users\Win10\Desktop\NFT_Market\contracts>remixd -s , --remix-ide https://remix.ethereum.org (node:14008) [DEP0128] DeprecationWarning: Invalid 'main' field in 'C:\Users\Win10\AppData\Roaming\npm\node_modules\@remix-project\remixd\node_modules\@remixproject\plugin-ws\package.json' of 'src/index.js'. Please either fix that or report it to the module author (Use `node --trace-deprecation ...` to show where the warning was created) (node:14008) [DEP0128] DeprecationWarning: Invalid 'main' field in 'C:\Users\Win10\AppData\Roaming\npm\node_modules\@remix-project\remixd\node_modules\@remixproject\plugin-utils\package.json' of 'src/index.js'. Please either fix that or report it to the module author (node:14008) [DEP0128] DeprecationWarning: Invalid 'main' field in 'C:\Users\Win10\AppData\Roaming\npm\node_modules\@remix-project\remixd\node_modules\@remixproject\plugin\package.json' of 'src/index.js'. Please either fix that or report it to the module author (node:14008) [DEP0128] DeprecationWarning: Invalid 'main' field in 'C:\Users\Win10\AppData\Roaming\npm\node_modules\@remix-project\remixd\node_modules\@remixproject\plugin-api\package.json' of 'src/index.js'. Please either fix that or report it to the module author (node:14008) [DEP0128] DeprecationWarning: Invalid 'main' field in 'C:\Users\Win10\AppData\Roaming\npm\node_modules\@remix-project\remixd\node_modules\@remixproject\plugin-utils\package.json' of 'src/index.js'. Please either fix that or report it to the module author (node:14008) [DEP0128] DeprecationWarning: Invalid 'main' field in 'C:\Users\Win10\AppData\Roaming\npm\node_modules\@remix-project\remixd\node_modules\@remixproject\plugin\package.json' of 'src/index.js'. Please either fix that or report it to the module author [INFO] you are using the latest version 0.5.7 [WARN] You may now only use IDE at https://remix.ethereum.org to connect to that instance [ERR] No valid shared folder provided.
실행시 이러한 오류가 나는데요 무슨 이유일까요 java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:132) at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:124) at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:190) at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:132) at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:248) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:227) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:289) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:291) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:246) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97) at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329) at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at org.junit.runners.ParentRunner.run(ParentRunner.java:413) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69) at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38) at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11) at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35) at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235) at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1804) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1154) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:908) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:740) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:415) at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:136) at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:99) at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:124) ... 27 more Caused by: org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment] at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:275) at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237) at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214) at org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory.injectServices(DefaultIdentifierGeneratorFactory.java:175) at org.hibernate.service.internal.AbstractServiceRegistryImpl.injectDependencies(AbstractServiceRegistryImpl.java:286) at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:243) at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214) at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.<init>(InFlightMetadataCollectorImpl.java:173) at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:127) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1460) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1494) at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:58) at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:365) at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409) at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:341) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1863) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800) ... 42 more Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.determineDialect(DialectFactoryImpl.java:100) at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:54) at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:138) at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35) at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:101) at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263) ... 59 more
교제 45p에 AND, OR, NOT을 &&, ||, !로 표현한다고 되어있고, 그 기능들은 잘 이해하였는데, 그 밑에 &, | 이렇게 하나만 있는 것은 무엇을 뜻하는 지 모르겠습니다. 예를 들면 true && false true || false 이런 것들은 이해하였는데 true & false true | false 이것들은 이해하기 좀 어렵습니다. 둘이 무슨 차이가 있는지 잘 모르겠습니다. 하나만 쓰는 거는(&, |) 두개를 쓰는 거랑(&&, ||) 무슨 차이 인가요? 기능은 같은 것 같은데..
안녕하세요 Rookiss 선생님 선생님 강의를 듣는 수강생입니다. 수강 후 몇 가지 질문 사항이 있어 질문드립니다. 제 소개를 간단히 하자면, 소수의 사용자를 다루는 윈도우 소켓 서버프로그래밍 개발, N년차, 게임회사 재직 경험 없음 입니다. 게임회사 경력직 서버 개발자로 이직을 생각중인데요. 1. 저같은 사람(게임회사 경험 무, 경력 이직)은 이직시 뭘 중시해야 할까요? 2. 포트폴리오를 중시하셨는데, 클라이언트일 경우 가시적으로 뭔가 보여줄게 있지만 서버의 경우 어떤것을 보여줘야 할까요? 3. 회사 이력서에 샘플 소스코드를 많이 요구하는것 같습니다. 이것이 많이 중요한가요? 프로젝트를 통째로 내는 느낌은 아니고 샘플 코드를 제출하라는 곳이 많습니다. 4. 블로그 주소나, github 주소가 없는 것은 큰 감점 요소인가요? 답변주시면 감사하겠습니다.!
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 안녕하세요 개발자 도구 vue 탭에서 저는<Root>가 보이지 않는데 어떤 설정이 달라서 그런걸까요...? 에러도 안나고 실습하는데 문제는 없어서 일단은 이렇게 진행중입니다..
f(4)일 때 int f(int n) { printf('%d',n); if(n==0) return 0; else if (n==1) return 1 else return (f(n-1) + f(n+2); } print 되는 숫자가 4,3,2,1,0,1,2,1,0 이라고 나와있습니다. 왜 n의 값이 저렇게 프린트 되는지 잘 이해가 되지 않습니다.
https://github.com/junsuk5/android-compose/tree/master/examples/TodoList 위 프로젝트 빌드에러가 발생하네요.. Execution failed for task ':app:kaptDebugKotlin'. > A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptWithoutKotlincTask$KaptExecutionWorkAction > java.lang.reflect.InvocationTargetException (no error message) * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
안녕하세요! 강의 너무나 잘 듣고 있습니다. public class Settings { private Settings() { } private static class SettingsHolder { private static final Settings INSTANCE = new Settings(); } public static Settings getInstance() { return SettingsHolder.INSTANCE; } } 로드 시점에 관한 질문입니다. getInstance가 호출 될때 SettingsHolder가 JVM에 로드된다고 말씀하셨습니다. 자바는 잘 모르지만, 동적으로 로드가 된다고 해석했습니다. public class Settings { private static final Settings INSTANCE = new Settings(); private Settings() { } public static Settings getInstance() { return INSTANCE; } } 그렇다면 이른 초기화 방식도, 마치 SettingsHolder가 그러하듯, 필요로 할 때 동적으로 로드 될 순 없나요? 필요로 할 때 로드된다면 SettingsHolder를 필요로 하지 않을 테니 말이죠. 그럼에도 불구하고 static inner class를 사용하는 건 반드시 이유가 있을 테니.. 하여 제 나름대로 찾아보고 테스트해 본 결과 자바 파일에 정의된 기본 클래스들은 실행 시 로드됨을 확인했습니다. 모든 클래스가 실행 시 로드되는진 확실하진 않지만 이와 관련된 JVM의 로드 정책에 대해서 간략하게 설명 부탁드립니다. :)