묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
해결됨실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
섹션1 JPA와 DB설정, 동작확인 강의에서 Test를 통과했는데 Member 테이블이 생성되지않았습니다
[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예)[질문 내용]안녕하세요.현재 '실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발 강의'에서 'JPA와 DB 설정, 동작확인' 강의를 듣고 있습니다.H2 데이터베이스에 연결하고, 테스트 코드를 실행해서 통과했다고 나옵니다. 그런데 강의 영상처럼 create table, drop table 등의 메시지가 터미널에 나오기는 하는데 제대로 된 건지 잘 모르겠습니다. 그리고 가장 큰 문제는 H2 데이터베이스에 Member 테이블이 생성되지 않았습니다.아래 코드와 스크린샷을 첨부합니다.제가 한 부분 중 잘못된 부분이 있는 건지 궁금합니다.그리고 어떻게 하면 해결할 수 있는지 궁금합니다. Memberpackage jpabook.jpashop; import lombok.Getter; import lombok.Setter; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; @Entity @Getter @Setter public class Member { @Id @GeneratedValue private Long id; private String username; } MemberRepositorypackage jpabook.jpashop; import org.springframework.stereotype.Repository; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; @Repository public class MemberRepository { @PersistenceContext private EntityManager em; public Long save(Member member) { em.persist(member); return member.getId(); } public Member find(Long id) { return em.find(Member.class, id); } } application.ymlspring: datasource: url: jdbc:h2:tcp://localhost/~/jpashop username: sa password: driver-class-name: org.h2.Driver jpa: hibernate: ddl-auto: create properties: hibernate: # show_sql: true format_sql: true logging.level: org.hibernate.SQL: debug org.hibernate.type: trace #스프링 부트 2.x, hibernate5 org.hibernate.orm.jdbc.bind: trace #스프링 부트 3.x, hibernate6 MemberRepositoryTestpackage jpabook.jpashop; import org.assertj.core.api.Assertions; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.transaction.annotation.Transactional; import static org.junit.jupiter.api.Assertions.*; @RunWith(SpringRunner.class) @SpringBootTest public class MemberRepositoryTest { @Autowired MemberRepository memberRepository; @Test @Transactional public void testMember() throws Exception { //given Member member = new Member(); member.setUsername("memberA"); //when Long saveId = memberRepository.save(member); Member findMember = memberRepository.find(saveId); //then Assertions.assertThat(findMember.getId()).isEqualTo(member.getId()); Assertions.assertThat(findMember.getUsername()).isEqualTo(member.getUsername()); } } 테스트 결과의 일부분 스크린샷 이 상태로 H2에 접속했습니다.테스트 후 H2 데이터베이스의 스크린샷 위의 스크린샷처럼 테스트를 실행하면 통과로 나오기는 합니다.그렇지만 강의 영상처럼 create table, drop table이라고 되어있는 부분이 있지만 제대로 된 건지 모르겠습니다.그리고 테스트 후 H2 데이터베이스를 보면 Member가 생성되지 않았습니다.(가장 큰 문제)제 코드나 제가 실행한 부분 중에서 잘못된 부분이 있는지 궁금합니다.그리고 해결 방법도 궁금합니다.감사합니다.
-
미해결자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]
도메인 이름
강의에서 이세계의 집 주소 별칭을 현실 세계의 도메인으로 빗대어 설명해 주신 부분에 대한 질문입니다.1. 강의를 들을 때 '서울에 있는 컴퓨터' == 강의를 듣고 있는 내 노트북, '대전에 있는 컴퓨터' == 인프런 사이트의 서버 쯤으로 이해하는 게 맞을까요?처음에는 간단하게 친구 컴퓨터와 내 컴퓨터 사이의 카카오톡으로 데이터를 주고 받는 상황 으로 이해 헀는데, '대전에 있는 컴퓨터'의 주소에 도메인 이름이 붙는 걸 보니 이해가 안 가더라구요. 내 컴퓨터에 spring.com 이라는 주소 이름이 붙을리가 없으니까요.친구 컴퓨터와 내 컴퓨터 사이의 카카오톡 통신은 '친구 노트북와 카카오 서버와의 통신' + '카카오 서버와 내 노트북의 통신' 으로 나뉜다고 이해하는 게 맞을까요? 만약 위에서 카카오톡을 예시로 든 내용이 맞는 내용이라면 추가로 더 궁금한 게 있습니다.채팅 어플에선 어떤 HTTP Method를 사용하나요? 내가 친구에게 카톡을 보낸다면 POST 같은 메소드를 쓸 수 있을 것 같긴한데, 그건 내가 '보내기' 버튼을 이용해서 카카오 서버에 요청하는 것으로 생각해봤습니다. 그런데 친구에게서 오는 카톡은 어떻게 나에게 오는 건지는 도무지 생각이 나질 않습니다. 내 컴퓨터에서 카톡 서버에 실시간으로 계속해서 GET과 같은 메소드로 요청을 하는 것은 아닌 것 같아서요. 카카오와 같은 서버가 내 컴퓨터로 요청하는 경우가 있다면, 내 컴퓨터는 따로 도메인 주소를 갖고 있지 않으니 그냥 내 컴퓨터 IP를 사용하나요?
-
해결됨자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]
workspace.xml 파일에 대한 질문 (.gitignore)
강의를 따라 하면서 단계마다 깃에도 커밋을 하고 있는데요코드가 변경될 때마다workspace.xml라는 파일은 건들지 않았는데도 계속 변경이 되어서 깃에 감지가 되더라구요.ChatGPT 한테 물어보니까 "이 파일에는 개발 환경 설정과 관련된 정보가 포함되어 있으며, 이 정보는 다른 개발자나 다른 컴퓨터에서는 필요하지 않을 수 있습니다."라고 하고 깃에 안 올려도 된다고 하길래 .gitignore 에 .idea/workspace.xml이렇게 추가를 해줬는데도 자꾸 깃에 감지가 됩니다.혹시 .gitignore에 추가했다고 바로 적용이 안되는 건지, 적용하는 방법이 따로 있는지 궁금합니다.
-
해결됨자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]
예외 처리에 대한 질문입니다.
안녕하세요 강사님. 15강. 유저 업데이트 API, 삭제 API 예외 처리 하기유저 업데이트 API, 삭제 API 에 예외 처리해 주는 부분을 수강 중인데요 궁금한 점이 있어서 질문 남깁니다. 존재하지 않는 사용자에 대해서 수정하거나 삭제하려는 상황에 대해서 예외 처리를 해주고 있는데,'존재하지 않는 사용자에 대해서 수정하거나 삭제하려는 경우'가 포스트맨을 이용하여 요청할 때는 일어날 수도 있는 경우겠지만,사용자는 웹 UI를 이용해서 수정, 삭제하기 때문에 저런 경우가 아예 생기지가 않을 것 같은데,(화면에 보이는 유저 리스트에서 선택하여 수정하거나 삭제하기 때문에)그런데도 예외 처리를 해줘야 하는 이유가 있는지 궁금합니다.
-
해결됨스프링 시큐리티
FilterSecurityInterceptor에서 AuthenticationManager 주입 받는 이유
안녕하세요 강사님 4) 웹 기반 인가처리 DB 연동 - FilterInvocationSecurityMetadataSource (1) 수업을 듣다가 질문드립니다. FilterSecurityInterceptor에서 AuthenticationManager 주입 받는 이유가 궁금합니다. 인증은 앞의 필터를 지나면서 이미 완료가 되었고, FilterSecurityInterceptor는 인증이 끝난 뒤에, 권한 정보를 조회해서 체크하는 곳이고, 인증 정보는 SecurityContextHolder에서 꺼내면 되는데, AuthenticationManager로 뭘하려고 주입받는 것인지 궁금합니다. AbstractSecurityInterceptor 코드를 살펴보니, authenticateIfRequired 메서드에서 SecurityContextHolder에서 꺼낸 Authentication 객체가 isAuthenticated 가 false일때 AuthenticationManager에 Authentication 객체를 넘겨서 재인증을 시도하고 있습니다. private Authentication authenticateIfRequired() {Authentication authentication = SecurityContextHolder.getContext().getAuthentication();if (authentication.isAuthenticated() && !this.alwaysReauthenticate) {if (this.logger.isDebugEnabled()) {this.logger.debug("Previously Authenticated: " + authentication);}return authentication;} else {authentication = this.authenticationManager.authenticate(authentication);if (this.logger.isDebugEnabled()) {this.logger.debug("Successfully Authenticated: " + authentication);}SecurityContextHolder.getContext().setAuthentication(authentication);return authentication;}} 그런데, 이미 앞에서 인증 과정을 거친 결과가 isAuthenticated == false인 상태에서, 재인증을 시도하는 것이 무슨 의미가 있는지 궁금합니다. 결과가 달라지는 케이스가 있는건지, 재인증이 목적이 아닌건지... 아니면 인증을 처리하는 필터가 앞에 없을때를 가정하는건지...궁금합니다. 답변 주시면 감사하겠습니다.
-
미해결자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]
34강 address_id 관련 질문 있습니다.
안녕하세요!Person 테이블 생성 시 adress_id bigint로 설정하였고, Person 클래스에는 private Address adress;를 사용하였습니다.DB에 Person을 저장할 때, 제 코드의 Unknown column 'address_id'라는 오류는 위의 차이에서 발생한 것 같습니다. 제가 놓치고 있는 부분이 궁금해서 문의드립니다!
-
미해결스프링과 JPA 기반 웹 애플리케이션 개발
테스트 실행시 컨테이너 에러
실행시 아래와 같은 에러가 발생합니다. 컨테이너 버전은 1.15.0으로 사용하였으며에러 상세내용 아래에 작성하였습니다. 다른 에러부분도 내용이 비슷한듯 합니다. 도움 부탁드립니다. java.lang.NoClassDefFoundError: org/testcontainers/containers/wait/LogMessageWaitStrategy at org.testcontainers.containers.PostgreSQLContainer.<init>(PostgreSQLContainer.java:33) at org.testcontainers.containers.PostgreSQLContainer.<init>(PostgreSQLContainer.java:28) at com.cryptoWebService.infra.AbstractContainerBaseTest.<clinit>(AbstractContainerBaseTest.java:10) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490) at org.junit.platform.commons.util.ReflectionUtils.newInstance(ReflectionUtils.java:513) at org.junit.jupiter.engine.execution.ConstructorInvocation.proceed(ConstructorInvocation.java:56) at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131) at org.junit.jupiter.api.extension.InvocationInterceptor.interceptTestClassConstructor(InvocationInterceptor.java:72) 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:77) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestClassConstructor(ClassBasedTestDescriptor.java:342) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateTestClass(ClassBasedTestDescriptor.java:289) at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.instantiateTestClass(ClassTestDescriptor.java:79) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:267) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$2(ClassBasedTestDescriptor.java:259) at java.base/java.util.Optional.orElseGet(Optional.java:369) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$3(ClassBasedTestDescriptor.java:258) at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:31) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:101) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:100) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:65) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$1(NodeTestTask.java:111) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:111) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:79) at java.base/java.util.ArrayList.forEach(ArrayList.java:1541) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:143) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84) at java.base/java.util.ArrayList.forEach(ArrayList.java:1541) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:143) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32) at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:108) 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:96) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:75) 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:220) at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:53)Caused by: java.lang.ClassNotFoundException: org.testcontainers.containers.wait.LogMessageWaitStrategy at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ... 68 morejava.lang.NoClassDefFoundError: Could not initialize class com.cryptoWebService.modules.main.MainControllerTest at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490) at org.junit.platform.commons.util.ReflectionUtils.newInstance(ReflectionUtils.java:513) at org.junit.jupiter.engine.execution.ConstructorInvocation.proceed(ConstructorInvocation.java:56) at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131) at org.junit.jupiter.api.extension.InvocationInterceptor.interceptTestClassConstructor(InvocationInterceptor.java:72) 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:77) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestClassConstructor(ClassBasedTestDescriptor.java:342) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateTestClass(ClassBasedTestDescriptor.java:289) at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.instantiateTestClass(ClassTestDescriptor.java:79) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:267) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$2(ClassBasedTestDescriptor.java:259) at java.base/java.util.Optional.orElseGet(Optional.java:369) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$3(ClassBasedTestDescriptor.java:258) at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:31) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:101) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:100) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:65) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$1(NodeTestTask.java:111) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:111) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:79) at java.base/java.util.ArrayList.forEach(ArrayList.java:1541) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:143) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84) at java.base/java.util.ArrayList.forEach(ArrayList.java:1541) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:143) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32) at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:108) 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:96) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:75) 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:220) at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:53)java.lang.NoClassDefFoundError: Could not initialize class com.cryptoWebService.modules.main.MainControllerTest at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490) at org.junit.platform.commons.util.ReflectionUtils.newInstance(ReflectionUtils.java:513) at org.junit.jupiter.engine.execution.ConstructorInvocation.proceed(ConstructorInvocation.java:56) at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131) at org.junit.jupiter.api.extension.InvocationInterceptor.interceptTestClassConstructor(InvocationInterceptor.java:72) 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:77) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestClassConstructor(ClassBasedTestDescriptor.java:342) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateTestClass(ClassBasedTestDescriptor.java:289) at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.instantiateTestClass(ClassTestDescriptor.java:79) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:267) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$2(ClassBasedTestDescriptor.java:259) at java.base/java.util.Optional.orElseGet(Optional.java:369) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$3(ClassBasedTestDescriptor.java:258) at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:31) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:101) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:100) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:65) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$1(NodeTestTask.java:111) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:111) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:79) at java.base/java.util.ArrayList.forEach(ArrayList.java:1541) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:143) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84) at java.base/java.util.ArrayList.forEach(ArrayList.java:1541) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:143) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32) at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:108) 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:96) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:75) 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:220) at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:53)java.lang.NoClassDefFoundError: Could not initialize class com.cryptoWebService.modules.main.MainControllerTest at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490) at org.junit.platform.commons.util.ReflectionUtils.newInstance(ReflectionUtils.java:513) at org.junit.jupiter.engine.execution.ConstructorInvocation.proceed(ConstructorInvocation.java:56) at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131) at org.junit.jupiter.api.extension.InvocationInterceptor.interceptTestClassConstructor(InvocationInterceptor.java:72) 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:77) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestClassConstructor(ClassBasedTestDescriptor.java:342) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateTestClass(ClassBasedTestDescriptor.java:289) at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.instantiateTestClass(ClassTestDescriptor.java:79) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:267) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$2(ClassBasedTestDescriptor.java:259) at java.base/java.util.Optional.orElseGet(Optional.java:369) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$3(ClassBasedTestDescriptor.java:258) at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:31) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:101) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:100) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:65) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$1(NodeTestTask.java:111) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:111) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:79) at java.base/java.util.ArrayList.forEach(ArrayList.java:1541) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:143) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84) at java.base/java.util.ArrayList.forEach(ArrayList.java:1541) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:143) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32) at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:108) 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:96) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:75) 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:220) at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:53)
-
미해결토비의 스프링 부트 - 이해와 원리
ProxyBeanMethods = false에 대해 궁금합니다.
MyAutoConfiguration에서 ProxyMethods를 false를 줬으니 Tomcat과 DisPatcherServlet이 호출될떄마다 새로 생성되는건가요??
-
미해결[초급] 찍어먹자! 코틀린과 Spring Security + JWT로 회원가입 만들기
1 : N 필드 `memberRole` 에 @OneToMany 옵션 cascade 미사용, 컬랙션 null 초기화 에 대한 질문입니다.
class Member( ... ) { @OneToMany(fetch = FetchType.LAZY, mappedBy = "member") ⬅️Q1:"cascade 없음 이유" val memberRole: List<MemberRole>? = null ⬅️Q2: "null 초기화"(mutableListOf() 누락) } Q1:cascade 미사용:강의 컨샙에 맞춰 쉬운 예제 구성을 목적으로 컬랙션 필드에 Cascade 설정을 안하신게 아닐까 추측했지만, 한편으로 다른 구현방법에 대한 다른이유가 있으신 것인지 강의에 언급되지 않은 부분을 여쭤보고 싶었습니다.Q2:컬랙션 null 초기화:일반적인 JPA 예제에서는 JpaEntity 의 1:N 관계 필드는 Collection 초기화를 하더라구요. null 로 초기화 할 때의 장점 이라던지, 다른 이유가 있는지 궁금해서 남기게 되었습니다. 읽어주셔서 감사합니다.
-
미해결실전! 스프링 부트와 JPA 활용2 - API 개발과 성능 최적화
중복 메서드 추출 안되네요 ㅠㅠ
메서드 추출은 되는데IntelliJ IDEA 2023.2.2 Ultimate(컴퓨터는 맥북)해당 버전 사용중입니다 중복된 메서드일때 intellij 에서Extract Parameters to Replace Duplicate(10:34 초부분)이건 안되네요.인텔리제이 버전 업하면서 그런거같은데혹시 해당 화면처럼 하는 팁 있을까요?package jpabook.jpashop; import jakarta.annotation.PostConstruct; import jakarta.persistence.EntityManager; import jpabook.jpashop.domain.*; import jpabook.jpashop.domain.item.Book; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; /** * 총 주문 2개 * userA * * JPA1 BOOK * * JPA2 BOOK * userB * * SPRING1 BOOK * * SPRING2 BOOK */ @Component @RequiredArgsConstructor public class initDb { private final InitService initService; @PostConstruct public void init() { initService.dbInit1(); // 여기에 코드들 다 넣는 경우는 작동하지 않는다 initService.dbInit2(); } @Component @Transactional @RequiredArgsConstructor static class InitService { private final EntityManager em; public void dbInit1() { Member member = new Member(); member.setName("userA"); member.setAddress(new Address("서울", "1", "1111")); em.persist(member); Book book1 = new Book(); book1.setName("JPA1 BOOK"); book1.setPrice(10000); book1.setStockQuantity(100); em.persist(book1); Book book2 = new Book(); book2.setName("JPA2 BOOK"); book2.setPrice(20000); book2.setStockQuantity(100); em.persist(book2); OrderItem orderItem1 = OrderItem.createOrderItem(book1, 10000, 1); OrderItem orderItem2 = OrderItem.createOrderItem(book1, 20000, 2); Delivery delivery = new Delivery(); delivery.setAddress(member.getAddress()); Order order = Order.createOrder(member, delivery, orderItem1, orderItem2);// ... 되어있으면 여러개 넘길 수 있다 em.persist(order); } public void dbInit2() { Member member = new Member(); member.setName("userB"); member.setAddress(new Address("진주", "2", "2222")); em.persist(member); Book book1 = new Book(); book1.setName("JPA1 BOOK"); book1.setPrice(10000); book1.setStockQuantity(100); em.persist(book1); Book book2 = new Book(); book2.setName("JPA2 BOOK"); book2.setPrice(20000); book2.setStockQuantity(100); em.persist(book2); OrderItem orderItem1 = OrderItem.createOrderItem(book1, 10000, 1); OrderItem orderItem2 = OrderItem.createOrderItem(book1, 20000, 2); Delivery delivery = new Delivery(); delivery.setAddress(member.getAddress()); Order order = Order.createOrder(member, delivery, orderItem1, orderItem2);// ... 되어있으면 여러개 넘길 수 있다 em.persist(order); } } }전체코드고 아래 부분을 메서드 추출하면 중복 체크하고 매개변수 넘기는 방식으로는 안되네요.. Member member = new Member(); member.setName("userA"); member.setAddress(new Address("서울", "1", "1111")); em.persist(member);
-
해결됨스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
회원 가입 Whitelabel Error 오류
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]여기에 질문 내용을 남겨주세요. 안녕하세요. 진행 중 해결되지 않는 오류가 있어 질문 드립니다.기본 페이지 HelloSpring 까지는 정상적으로 뜨는데 이후 회원 가입 버튼을 누르면 Whitelabel 오류가 발생합니다.비슷한 질문들이 있어서 확인하여 오타와 템플릿 구조까지 확인하였는데 원인을 모르겠습니다.-MemberController-MemberForm-createMemberForm.html-home.html-에러 코드아래는 프로젝트 파일 구글 드라이브 링크입니다.https://drive.google.com/drive/folders/11r1sRmpTQR_So_Yu06AFgux0aCphYlUm?usp=sharing 감사합니다
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
h2.bat 입력시 실행이 되지 않습니다
[질문 템플릿]1. 강의 내용과 관련된 질문인가요? 예2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? 예3. 질문 잘하기 메뉴얼을 읽어보셨나요? 예[질문 내용]cmd에서 h2.bat 입력시 해당 화면만 뜨고 실행되지 않습니다.자바 11을 쓰고 있으며 환경변수도 확인했고h2 재설치, 자바 재설치도 해봤습니다파일탐색기에서 h2.bat 파일을 실행해도 결과는 똑같습니다뭐가 문제일까요
-
미해결스프링 배치
DB - JdbcCursorItemReader 강의 질문
DB - JdbcCursorItemReader 강의에서fetchSize(int chunkSize) API는 정확히 어떤걸 의미하나요?일반적으로 JDBC 프로그래밍에서 fetchSize는 어플리케이션과 DB 사이의 round trip 횟수에 영향을 주는 파라미터로 알고 있습니다. 예를 들어, 테이블에 100rows가 있고 fetchSize가 10이면 어플리케이션은 DB와 10번 데이터를 송수신하는 것으로 알고 있습니다.fetchSize(int chunkSize) API는 제가 알고 있는 fetchSize를 설정하는 API가 맞나요..?
-
미해결Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
random.value사용 질문있습니다.
안녕하세요 좋은강의 항상 감사합니다! 강의 도중 의문이 생겨서 문의드립니다. 혹시 yml설정에eureka: instance: instance-id: ${spring.cloud.client.hostname}:${spring.application.instance_id:${random.value}}${spring.application.instance_id을 포함하지 않고eureka: instance: instance-id: ${spring.cloud.client.hostname}:${random.value}${random.value}만 포함해도 동일한 값으로 인스턴스가 표시되던데 ${spring.application.instance_id를 포함하신 이유가 궁금합니다. 감사합니다!
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
윈도우 cmd창에서 java -jar 명령어 실행 안되는 오류
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? 예2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? 아니오3. 질문 잘하기 메뉴얼을 읽어보셨나요? 예[질문 내용]자바 환경변수 - > 설정 완료재부팅 -> 완료두가지 전부 해봤는데 아무 반응이 없습니다.bulid -> libs 디렉토리에서 java -jar ~~ 명령어 실행이 안됩니다. 확인하실 때 필요한 사진이나 파일 있으면 알려주시면 감사하겠습니다 // 사진 첨부2-1.2-2.
-
미해결자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]
계속 복습중이고 새로운 사이트를 만드는 중인데
spring: profiles: active: local datasource: url: "jdbc:h2:mem:balance;MODE=MYSQL;NON_KEYWORDS=USER" username: "sa" password: "" driver-class-name: org.h2.Driver jpa: hibernate: ddl-auto: create properties: hibernate: show_sql: true format_sql: true dialect: org.hibernate.dialect.H2Dialect h2: console: enabled: true path: /h2-console server: port: 8081 --- spring: profiles: active: dev datasource: url: "jdbc:mysql://localhost/balance" username: "root" password: "Abcd1234!" driver-class-name: com.mysql.cj.jdbc.Driver jpa: hibernate: ddl-auto: none properties: hibernate: format_sql: true show_sql: true dialect: org.hibernate.dialect.MySQL8Dialect server: port: 8081여기서 틀린게 있나요?프로파일이 local로 되어있어도 mysql 로연결하고 h2 로 연결되어도 create인데도 쿼리문이 안뜹니다 ㅠㅠ
-
미해결자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]
인스턴스에 대한 질문입니다.
새로운 인스턴스를 만드려는데 t2micro 처럼 1년간 무료인 애들은 어떤애들이 있는지 어떻게 알수 있을까요?? 1년간 공짜인 애들은 t2밖에없나요??아님 모든 인스턴스가 그런가요?
-
미해결스프링 시큐리티 OAuth2
JWT 자체 검증에 대해서 질문드립니다
강의 막바지에 인가서버에서는 개인키로 서명하고, 자원 서버에서는 공개키로 검증한다고 하셨는데, 말그대로 공개키는 노출되어있는 키여서, 누구나 검증할 수 있어서 보안적인 측면에서 취약한거 아닌가요?? 공개키로 서명하고 -> 리소스 서버에서 개인키로 검증해야하는게 맞지 않나 싶어서 질문드립니다
-
미해결실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
테스트코드 콘솔에 sql코드
강의 영상에서 강사님 콘솔에는 테스트 코드를 돌려도 SQL코드가 뜨는데 저는 뜨질 않습니다.버전이 유료버전이라 뜨는건가요?
-
미해결spring boot actuator 파헤치기
AtomicLong
AtomicLong을 쓰신 이유가 있으신가요?