학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? 예 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? 예 3. 질문 잘하기 메뉴얼을 읽어보셨나요? 예 [질문 내용] start.spring.io 에서 spring boot를 설치하고 h2 버전도 1.4.199로 설치하였습니다. 그러나 아래의 사진과 같이 라이브러리 내에 h2:1.4.199가 아닌 h2:2.1.214가 설치되어 있습니다. 이 부분 때문에 다음 강의에서 제대로 실행이 되지 않는 것 같습니다 .. (MEMBER 테이블 생성이 되지 않음) 왜 이러는 걸까요 ..? 해결 방법도 알려주시면 감사하겠습니다 ㅜ ㅜ
안녕하세요. 강의를 듣고 강의자료까지 참고하며 코드를 작성하였습니다. 그러나 실행창에 create와 drop이 뜨지도 않고 MEMBER 테이블 또한 생성되지 않습니다. 관련 질의를 지금 6시간 넘게 다 찾아보며 (띄어쓰기, @Rollback(false) 추가 등) 해결 시도를 했지만 끝까지 되지 않아 질문 남깁니다 .. [yml 코드] 감사합니다 ..
[C#과 유니티로 만드는 MMORPG 게임 개발 시리즈] 번외편: AWS로 시작하는 서버 운영
안녕하세요. 웹서버 및 aws 강의 잘 들었습니다 playfab으로 서비스 했던 경험은 있지만 직접 서버를 구현하여 서비스하는 경험을 배우고자 다음달쯤 게임을 배포 할 예정에 있습니다. 궁금한건 서비스 경험이 없으니 미리 요금 계산해 볼 때 얼마나 책정해야 할지 감이 오지 않습니다. ec2는 시간당 비용과 데이터송신시 비용과 rds는 성능당 시간당요금이 책정되어 있는걸로 확인했습니다 일반적으로 게임 회사에서 서비스전 서버 비용을 예측할 때 사용하는 방법이 있을까요?
자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]
안녕하세요! 강의를 완강 후 혼자 프로젝트를 진행하다 도서 대출 코드를 보고 비슷하게 구현한 사용자가 채용공고를 지원하는 메소드를 호출시 테스트 코드에서 NPE가 발생하는데 혹시 이유를 알 수 있을까요? 여러가지 서칭해봐도 해결이 안되서 질문드립니다... ㅠㅠ 회원entity @Getter @NoArgsConstructor(access = AccessLevel.PROTECTED) @Table(name = "users") @Entity public class User { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "user_id") private Long id; private String name; @OneToMany(mappedBy = "user", cascade = CascadeType.ALL, orphanRemoval = true) private List<ApplyHistory> applyHistory = new ArrayList<>(); public void applyCompany(JobPosting jobPosting) { this.applyHistory.add(new ApplyHistory(this, jobPosting)); } @Builder private User(Long id, String name, List<ApplyHistory> applyHistory) { this.id = id; this.name = name; this.applyHistory = applyHistory; } } ApplyHistory entity(JobPosting과 user객체가 N:M 매핑해주는 entity) @Getter @NoArgsConstructor(access = AccessLevel.PROTECTED) @Table(name = "apply_history") @Entity public class ApplyHistory { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "apply_history_id") private Long id; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "user_id") private User user; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "job_posting_id") private JobPosting jobPosting; public ApplyHistory(User user, JobPosting jobPosting) { this.user = user; this.jobPosting = jobPosting; } } JobPosting Entity @Getter @NoArgsConstructor(access = AccessLevel.PROTECTED) @Table(name = "job_posting") @Entity public class JobPosting { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "job_posting_id") private Long id; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "company_id") private Company company; @Column(name = "posting_position") private String position; private int compensation; //채용보상금 @Column(name = "posting_details") private String postingDetails; @Column(name = "technology_used") private String technologyUsed; @Builder private JobPosting(Company company, String position, int compensation, String postingDetails, String technologyUsed) { this.company = company; this.position = position; this.compensation = compensation; this.postingDetails = postingDetails; this.technologyUsed = technologyUsed; } public void updateJobPosting(String position, int compensation, String postingDetails, String technologyUsed) { this.position = position; this.compensation = compensation; this.postingDetails = postingDetails; this.technologyUsed = technologyUsed; } } applyService @RequiredArgsConstructor @Service public class ApplyService { private final JobPostingRepository jobPostingRepository; private final UserRepository userRepository; private final ApplyHistoryRepository userJobPostingRepository; @Transactional public void applyCompany(ApplyCompanyRequest request) { // 1. 채용공고 정보 찾기 JobPosting jobPosting = jobPostingRepository.findById(request.getJobPostingId()) .orElseThrow(() -> new ResourceNotFoundException("jobPosting", request.getJobPostingId())); // 2. 유저 정보 가져오기 User user = userRepository.findById(request.getUserId()) .orElseThrow(() -> new ResourceNotFoundException("user", request.getUserId())); // 3. 지원 유무 확인 // 3-1. 지원 중이면 예외 발생 if (userJobPostingRepository.existsByJobPostingAndUser(jobPosting, user)) { throw new IllegalArgumentException("이미 지원하신 회사입니다."); } user.applyCompany(jobPosting); } } 리퀘스트 @Getter @Setter public class ApplyCompanyRequest { private Long jobPostingId; private Long userId; } 서비스 테스트 코드 @SpringBootTest class ApplyServiceTest { @Autowired JobPostingService jobPostingService; @Autowired ApplyService applyService; @Autowired JobPostingRepository jobPostingRepository; @Autowired UserRepository userRepository; @Autowired ApplyHistoryRepository applyHistoryRepository; @Autowired CompanyRepository companyRepository; @AfterEach void tearDown() { applyHistoryRepository.deleteAllInBatch(); jobPostingRepository.deleteAllInBatch(); userRepository.deleteAllInBatch(); companyRepository.deleteAllInBatch(); } @DisplayName("사용자는 채용 공고를 지원 할 수 있다.") @Test @Transactional void applyCompany() { //given User user = User.builder() .id(1L) .name("jw") .build(); User savedUser = userRepository.save(user); Company company = Company.builder() .name("company1") .country(Country.KOREA) .city(City.SEOUL) .build(); Company savedCompany = companyRepository.save(company); JobPosting jobPosting = JobPosting.builder() .company(savedCompany) .position("백엔드") .postingDetails("백엔드 개발자 채용합니다.") .compensation(500000) .technologyUsed("Java") .build(); JobPosting savedJobPosting = jobPostingRepository.save(jobPosting); ApplyCompanyRequest request = new ApplyCompanyRequest(); request.setUserId(savedUser.getId()); request.setJobPostingId(savedJobPosting.getId()); //when applyService.applyCompany(request); //then } } -> 이부분에서 applyCompany(request) 호출 시 NPE가 발생합니다. java.lang.NullPointerException at com.wanted.findjob.domain.user.User.applyCompany(User.java:36) at com.wanted.findjob.api.service.ApplyService.applyCompany(ApplyService.java:39) at com.wanted.findjob.api.service.ApplyService$$FastClassBySpringCGLIB$$2f4064b0.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:792) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:762) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:762) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:707) at com.wanted.findjob.api.service.ApplyService$$EnhancerBySpringCGLIB$$81701d47.applyCompany(<generated>) at com.wanted.findjob.api.service.ApplyServiceTest.applyCompany(ApplyServiceTest.java:83) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:725) at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60) at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131) at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149) at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140) at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84) at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115) 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:98) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:214) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:210) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:135) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:66) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at java.base/java.util.ArrayList.forEach(ArrayList.java:1540) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at java.base/java.util.ArrayList.forEach(ArrayList.java:1540) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35) at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107) 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:114) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86) at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86) at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53) at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:57) 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:232) at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55) 테스트코드가 아닌 직접 서버를 작동해서 api를 호출 시 정상적으로 db에 들어가는 걸 볼 수 있는데 어디가 문제 인지를 모르겠습니다.. ㅠ
안녕하세요. 수업 잘 듣고 있습니다. 다이렉트 커넥트로 연결된 폐쇄망에서 스토리지 게이트웨이를 사용할 수 있을지 궁금합니다. https://docs.aws.amazon.com/filegateway/latest/files3/gateway-private-link.html#create-vpc-endpoint 사설망으로 구성된 VPC에 VPC 엔드포인트를 만들어서 연결할 수 있는 것처럼 보이는데 공용ip 설정하지 않고 온프렘과 S3를 스토리지 게이트웨이를 거쳐서 다이렉트 커넥트로 연결할 수 있는 건지 궁금합니다.
@Beanpublic SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception{return http.authorizeHttpRequests().requestMatchers("/auth/login").permitAll() .anyRequest().authenticated() .and().csrf(AbstractHttpConfigurer::disable) .build(); } 기존의 강의에 나온 위 코드를 실행하게 되면, This is because there is more than one mappable servlet in your servlet context: {org.springframework.web.servlet.DispatcherServlet=[/], org.h2.server.web.JakartaWebServlet=[/h2-console/*]}. 위와 같은 DispatcherServlet과 h2-console의 서블릿이 하나 이상 매핑되어 나는 오류라고 나옵니다. @Bean public SecurityFilterChain securityFilterChain(HttpSecurity http, HandlerMappingIntrospector introspector) throws Exception{ http.authorizeHttpRequests((authz) -> { try { authz .requestMatchers(new MvcRequestMatcher(introspector,"/auth/login")).permitAll() //애는 권한 없이도 허용 .anyRequest().authenticated() //나머지는 인증해 .and() //csrf쪽으로는 builder가 이어지지 않기 때문에 and로 이어준다. .csrf(AbstractHttpConfigurer::disable); } catch (Exception e) { throw new RuntimeException(e); } }); return http.build(); } 그래서 검색 결과 위와 같이 작성하게 되면 정상적으로 실행되게 됩니다. - 질문 제가 코드를 기존에 SecurityFilterChain 외 잘못 작성한 부분이 존재해서 위와 같이 코드를 작성해야 하는 것인지, 아니면 그 사이에 이렇게 작성되도록 변경된 것인지 앞으로도 지속적으로 검색해보겠지만... 현재까진 답을 찾지 못해 질문드립니다. 2. h2-console의 경우 데이터베이스 관련 서블릿이고, DispatcherServlet은 웹 애플리케이션의 컨트롤러 역할을 하는 서블릿인걸로 알고 있는데 용도가 다른 두 서블릿의 매핑 혼동이 일어나는 이유가 궁금합니다... *무지한 한 생명체의 질문은 천천히 쾌차하시고 삶의 여유를 되찾으신 다음 답변해주시면 감사하겠습니다!
기본 db 인스턴스가 대충 뭔지는 알겠어요. 복제본들의 원본인거 같아요. 근데 단일 db 인스턴스는 무슨 차이가 있나요? 단일 db 인스턴스로 생성하면 db 인스턴스 클러스터는 생성되지만 복제본이 만들어지지 않나요? 단일 db 인스턴스와 기본 db 인스턴스는 복제본 및 오프로드 차이 뿐인가요?
JPQL를 데이터를 조회하면, DB에 먼저 조회한 후, 영속성 컨텍스트에 이미 동일한 엔티티가 있으면, DB에서 조회한 데이터를 버리고, 이미 있는 엔티티를 반환한다고 알고 있습니다. 만약, 기존 엔티티를 새로 검색한 엔티티로 대체한다면, 영속성 컨텍스트에 수정 중인 데이터가 사라질 수 있어, 위험하다고 하는데, 그러면, 조회시 수정 중인 데이터가 조회되어서, 의도치 않는 데이터가 조회될 수 있지 않나요? 오히려 수정 중인 데이터 대신 새로 조회한 데이터로 대체하는게 좋지 않을까 싶은데, 혹시, DB에서 조회한 데이터를 버리고, 이미 있는 엔티티를 반환하는게 더 장점인 구체적인 예시가 있을까요?
EC2 웹서버 운영시 외부에서 Client가 접속 후 리턴 트래픽을 받을 때 NAT를 사용하므로 임시포트 1024-65535를 사용 -> 이라고 설명해주셨는데 publicIP 를 privateIP 로 전환해주는 1:1 NAT 말고 다른것을 이야기하는건가요? 잘 이해가 안됩니다. 리턴 트래픽을 받을때는 목적지 포트가 클라이언트가 요청을 보낸 프로세스의 포트일테고, 해당 포트를 허용해주면 되는거아닌가요? NAT 가 왜 나오는지 잘 이해가 안됩니다.
자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]
BookService에서 @RequiredArgsConstructor을 설정하면 책 대출, 책 반납 등 BookRepository를 사용하는 코드에서 에러가 발생합니다. 오류 메시지는 "this.bookRepository" is null입니다. BookService에서 bookRepository가 받아오지 못하는 것 같습니다. 또한, 해당 어노테이션을 지운 후 생성자로 변경하면, 코드는 정상적으로 돌아가게 됩니다. Lombok의 문제인 건지, 코드의 특정 부분을 설정하면 되는 것인지 궁금합니다.
자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]
안녕하십니까. 다름이 아니라 profile을 local로 실행 시 오류가 나서 질문을 드립니다. 인텔리제이 Community 버전이라서 VM option 추가 후, -Dspring.profiles.active=local를 입력헀습니다. 실행을 할때 local 프로필이 활성화가 되었다고 하지만 오류가 발생합니다. VM option이 잘못된건가 싶어서 -Dspring.profiles.active=dev로 설정 시 MySQL이 정상적으로 작동합니다. 즉 h2관련 코드를 제가 잘못작성했거나 아니면 다른이유로 오류가 발생한다는건데 문제점을 제대로 파악을 하기가 힘들어서 질문을 드립니다. Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.h2.driver Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.h2.driver Caused by: java.lang.IllegalStateException: Cannot load driver class: org.h2.driver Execution failed for task ':LibraryAppApplication.main()'. > Process 'command 'C:/Program Files/Java/jdk-17/bin/java.exe'' finished with non-zero exit value 1 * 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.
제가 아직 초보 개발자라 막연히 setter 사용은 지양하는게 좋다고 배워서 실무에서는 다른지 궁금합니다. setter 를 열어두면 빈으로 등록된 AppConfig 의 불변성을 보장할 수 없게 되는게 아닌가 해서 질문드립니다. https://mangkyu.tistory.com/189 위 블로그를 보면 @ConfigurationProperties 를 setter 없이 생성자로 할 수도 있는것 같아서요. 혹시 제가 너무 setter 사용을 지양하라는 말에 매몰돼있는건 아닐까 고민도 되네요.