안녕하세요. 질문드립니다. 강의 0:51 부분에 댓글의 갯수를 가져올 때 post.Comments.length로 가져오셨는데 만약 전체 댓글이 10만개가 있다고 가정하면 이렇게 많은 댓글 갯수를 셀 때는 post.Comments.length를 통해 댓글 갯수를 세서 가져오는 것보다 백엔드에서 ORM의 도움을 받아서 count같은 메서드를 써서 DB에서 전체 댓글 갯수를 백엔드로부터 받아서 가져오는 방법이 더 성능적으로 효율적인 방법일까요?
이것저것 에러는 잡았는데 정확히 어디서 에러가 발생해서 안되는지 모르겠습니다. 2022-06-08 00:52:56.897 WARN 1532 --- [ restartedMain] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning 2022-06-08 00:52:57.389 WARN 1532 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : Unable to start LiveReload server 2022-06-08 00:52:57.540 INFO 1532 --- [ restartedMain] o.s.c.openfeign.FeignClientFactoryBean : For 'order-service' URL not provided. Will try picking an instance via load-balancing. 2022-06-08 00:52:58.184 INFO 1532 --- [ restartedMain] o.s.s.web.DefaultSecurityFilterChain : Will secure any request with [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@24caec5a, org.springframework.security.web.context.SecurityContextPersistenceFilter@d9e9a64, org.springframework.security.web.header.HeaderWriterFilter@7e87d99f, org.springframework.security.web.authentication.logout.LogoutFilter@65879726, com.example.userservice.security.AuthenticationFilter@796d03f1, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@91adcab, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@224e4c1, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@227c9777, org.springframework.security.web.session.SessionManagementFilter@15c61b3f, org.springframework.security.web.access.ExceptionTranslationFilter@569dde37, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@2c7bf90a] 2022-06-08 00:53:03.870 WARN 1532 --- [ restartedMain] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthEndpointWebMvcHandlerMapping' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointWebExtensionConfiguration$MvcAdditionalHealthEndpointPathsConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.servlet.AdditionalHealthEndpointPathsWebMvcHandlerMapping]: Factory method 'healthEndpointWebMvcHandlerMapping' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'functionsEndpoint' defined in class path resource [org/springframework/cloud/function/context/config/FunctionsEndpointAutoConfiguration.class]: Unsatisfied dependency expressed through method 'functionsEndpoint' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'functionCatalog' defined in class path resource [org/springframework/cloud/function/context/config/ContextFunctionCatalogAutoConfiguration.class]: Unsatisfied dependency expressed through method 'functionCatalog' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'avroSchemaMessageConverter' defined in class path resource [org/springframework/cloud/function/context/config/ContextFunctionCatalogAutoConfiguration$AvroSchemaMessageConverterConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.function.context.converter.avro.AvroSchemaMessageConverter]: Factory method 'avroSchemaMessageConverter' threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/avro/Schema$Parser 2022-06-08 00:53:03.904 INFO 1532 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default' 2022-06-08 00:53:04.061 INFO 1532 --- [ restartedMain] .SchemaDropperImpl$DelayedDropActionImpl : HHH000477: Starting delayed evictData of schema as part of SessionFactory shut-down' 2022-06-08 00:53:04.084 WARN 1532 --- [ restartedMain] o.s.b.f.support.DisposableBeanAdapter : Invocation of destroy method failed on bean with name 'inMemoryDatabaseShutdownExecutor': org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-176] 2022-06-08 00:53:04.085 INFO 1532 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... 2022-06-08 00:53:04.103 INFO 1532 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed. 2022-06-08 00:53:04.116 INFO 1532 --- [ restartedMain] o.apache.catalina.core.StandardService : Stopping service [Tomcat] 2022-06-08 00:53:04.387 INFO 1532 --- [ restartedMain] ConditionEvaluationReportLoggingListener : Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2022-06-08 00:53:04.560 ERROR 1532 --- [ restartedMain] o.s.boot.SpringApplication : Application run failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthEndpointWebMvcHandlerMapping' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointWebExtensionConfiguration$MvcAdditionalHealthEndpointPathsConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.servlet.AdditionalHealthEndpointPathsWebMvcHandlerMapping]: Factory method 'healthEndpointWebMvcHandlerMapping' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'functionsEndpoint' defined in class path resource [org/springframework/cloud/function/context/config/FunctionsEndpointAutoConfiguration.class]: Unsatisfied dependency expressed through method 'functionsEndpoint' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'functionCatalog' defined in class path resource [org/springframework/cloud/function/context/config/ContextFunctionCatalogAutoConfiguration.class]: Unsatisfied dependency expressed through method 'functionCatalog' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'avroSchemaMessageConverter' defined in class path resource [org/springframework/cloud/function/context/config/ContextFunctionCatalogAutoConfiguration$AvroSchemaMessageConverterConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.function.context.converter.avro.AvroSchemaMessageConverter]: Factory method 'avroSchemaMessageConverter' threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/avro/Schema$Parser at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:953) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) ~[spring-context-5.3.19.jar:5.3.19] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.19.jar:5.3.19] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) ~[spring-boot-2.6.7.jar:2.6.7] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:740) ~[spring-boot-2.6.7.jar:2.6.7] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:415) ~[spring-boot-2.6.7.jar:2.6.7] at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) ~[spring-boot-2.6.7.jar:2.6.7] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1312) ~[spring-boot-2.6.7.jar:2.6.7] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301) ~[spring-boot-2.6.7.jar:2.6.7] at com.example.userservice.UserServiceApplication.main(UserServiceApplication.java:19) ~[classes/:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na] at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na] at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) ~[spring-boot-devtools-2.6.7.jar:2.6.7] Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.servlet.AdditionalHealthEndpointPathsWebMvcHandlerMapping]: Factory method 'healthEndpointWebMvcHandlerMapping' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'functionsEndpoint' defined in class path resource [org/springframework/cloud/function/context/config/FunctionsEndpointAutoConfiguration.class]: Unsatisfied dependency expressed through method 'functionsEndpoint' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'functionCatalog' defined in class path resource [org/springframework/cloud/function/context/config/ContextFunctionCatalogAutoConfiguration.class]: Unsatisfied dependency expressed through method 'functionCatalog' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'avroSchemaMessageConverter' defined in class path resource [org/springframework/cloud/function/context/config/ContextFunctionCatalogAutoConfiguration$AvroSchemaMessageConverterConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.function.context.converter.avro.AvroSchemaMessageConverter]: Factory method 'avroSchemaMessageConverter' threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/avro/Schema$Parser at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653) ~[spring-beans-5.3.19.jar:5.3.19] ... 24 common frames omitted Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'functionsEndpoint' defined in class path resource [org/springframework/cloud/function/context/config/FunctionsEndpointAutoConfiguration.class]: Unsatisfied dependency expressed through method 'functionsEndpoint' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'functionCatalog' defined in class path resource [org/springframework/cloud/function/context/config/ContextFunctionCatalogAutoConfiguration.class]: Unsatisfied dependency expressed through method 'functionCatalog' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'avroSchemaMessageConverter' defined in class path resource [org/springframework/cloud/function/context/config/ContextFunctionCatalogAutoConfiguration$AvroSchemaMessageConverterConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.function.context.converter.avro.AvroSchemaMessageConverter]: Factory method 'avroSchemaMessageConverter' threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/avro/Schema$Parser at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:541) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1154) ~[spring-context-5.3.19.jar:5.3.19] at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.lambda$createEndpointBean$1(EndpointDiscoverer.java:145) ~[spring-boot-actuator-2.6.7.jar:2.6.7] at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer$EndpointBean.getBean(EndpointDiscoverer.java:447) ~[spring-boot-actuator-2.6.7.jar:2.6.7] at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.getFilterEndpoint(EndpointDiscoverer.java:307) ~[spring-boot-actuator-2.6.7.jar:2.6.7] at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.isFilterMatch(EndpointDiscoverer.java:295) ~[spring-boot-actuator-2.6.7.jar:2.6.7] at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.isEndpointFiltered(EndpointDiscoverer.java:270) ~[spring-boot-actuator-2.6.7.jar:2.6.7] at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.isEndpointExposed(EndpointDiscoverer.java:254) ~[spring-boot-actuator-2.6.7.jar:2.6.7] at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.convertToEndpoints(EndpointDiscoverer.java:181) ~[spring-boot-actuator-2.6.7.jar:2.6.7] at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.discoverEndpoints(EndpointDiscoverer.java:125) ~[spring-boot-actuator-2.6.7.jar:2.6.7] at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.getEndpoints(EndpointDiscoverer.java:117) ~[spring-boot-actuator-2.6.7.jar:2.6.7] at org.springframework.boot.actuate.autoconfigure.health.HealthEndpointWebExtensionConfiguration.getHealthEndpoint(HealthEndpointWebExtensionConfiguration.java:80) ~[spring-boot-actuator-autoconfigure-2.6.7.jar:2.6.7] at org.springframework.boot.actuate.autoconfigure.health.HealthEndpointWebExtensionConfiguration.access$000(HealthEndpointWebExtensionConfiguration.java:70) ~[spring-boot-actuator-autoconfigure-2.6.7.jar:2.6.7] at org.springframework.boot.actuate.autoconfigure.health.HealthEndpointWebExtensionConfiguration$MvcAdditionalHealthEndpointPathsConfiguration.healthEndpointWebMvcHandlerMapping(HealthEndpointWebExtensionConfiguration.java:92) ~[spring-boot-actuator-autoconfigure-2.6.7.jar:2.6.7] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na] at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na] at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.3.19.jar:5.3.19] ... 25 common frames omitted Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'functionCatalog' defined in class path resource [org/springframework/cloud/function/context/config/ContextFunctionCatalogAutoConfiguration.class]: Unsatisfied dependency expressed through method 'functionCatalog' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'avroSchemaMessageConverter' defined in class path resource [org/springframework/cloud/function/context/config/ContextFunctionCatalogAutoConfiguration$AvroSchemaMessageConverterConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.function.context.converter.avro.AvroSchemaMessageConverter]: Factory method 'avroSchemaMessageConverter' threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/avro/Schema$Parser at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:541) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1389) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1309) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791) ~[spring-beans-5.3.19.jar:5.3.19] ... 52 common frames omitted Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'avroSchemaMessageConverter' defined in class path resource [org/springframework/cloud/function/context/config/ContextFunctionCatalogAutoConfiguration$AvroSchemaMessageConverterConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.function.context.converter.avro.AvroSchemaMessageConverter]: Factory method 'avroSchemaMessageConverter' threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/avro/Schema$Parser at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1607) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1571) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1460) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1347) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1309) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791) ~[spring-beans-5.3.19.jar:5.3.19] ... 66 common frames omitted Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.function.context.converter.avro.AvroSchemaMessageConverter]: Factory method 'avroSchemaMessageConverter' threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/avro/Schema$Parser at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653) ~[spring-beans-5.3.19.jar:5.3.19] ... 83 common frames omitted Caused by: java.lang.NoClassDefFoundError: org/apache/avro/Schema$Parser at org.springframework.cloud.function.context.converter.avro.AbstractAvroMessageConverter.<init>(AbstractAvroMessageConverter.java:52) ~[spring-cloud-function-context-3.2.4.jar:3.2.4] at org.springframework.cloud.function.context.converter.avro.AbstractAvroMessageConverter.<init>(AbstractAvroMessageConverter.java:56) ~[spring-cloud-function-context-3.2.4.jar:3.2.4] at org.springframework.cloud.function.context.converter.avro.AvroSchemaMessageConverter.<init>(AvroSchemaMessageConverter.java:53) ~[spring-cloud-function-context-3.2.4.jar:3.2.4] at org.springframework.cloud.function.context.config.ContextFunctionCatalogAutoConfiguration$AvroSchemaMessageConverterConfiguration.avroSchemaMessageConverter(ContextFunctionCatalogAutoConfiguration.java:180) ~[spring-cloud-function-context-3.2.4.jar:3.2.4] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na] at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na] at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.3.19.jar:5.3.19] ... 84 common frames omitted Caused by: java.lang.ClassNotFoundException: org.apache.avro.Schema$Parser at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) ~[na:na] at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) ~[na:na] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[na:na] ... 93 common frames omitted
안녕하세요! 이번 실습에서 axios를 통해 상품데이터를 받아와서 화면에 보이게 하는 과정을 하다보니 기존에 products 변수에 직접 객체들을 작성하여 화면에 나타내는 것 보다 느리게 화면에 올라오는 것을 볼 수 있는데요. 이건 그냥 mock server를 통해 받아와서 그런거라고 이해하면 될까요? 상품이 세가지 밖에 없는데, 로딩 속도가 현저히 떨어지는 것이 의아하여 질문드립니다!
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 안녕하세요 비슷하면서도 slice와 map을 이용해서 문제를 풀었는데 시간복잡도상으로 slice가 들어가면서 더 좋지 않은 방식으로 풀게 된걸까요? function solution ( arr1 , arr2 ){ let answer =[]; let n = 0 , m = 0 ; while ( true ){ if ( arr1 [ n ]< arr2 [ m ]) { answer . push ( arr1 [ n ]) n ++ if ( n >= arr1 . length ){ arr2 . slice ( m ,). map ( data => answer . push ( data )) break ; } } else { answer . push ( arr2 [ m ]) m ++ if ( m >= arr2 . length ){ arr1 . slice ( n ,). map ( data => answer . push ( data )) break ; } } } return answer ; }
#include <iostream> #include <vector> using namespace std; int n = 0, ch[11], l[11]; vector<int> v; void DFS(int L) { if (L == n + 1) { int sum = 0; for (int i = 1; i <= n; i++) { if (ch[i] == 1) { sum += l[i]; } } v.push_back(sum); } else { ch[L] = 1; DFS(L + 1); ch[L] = 0; DFS(L + 1); } } int main() { //FILE* fp = nullptr; //freopen_s(&fp, "input.txt", "rt", stdin); cin >> n; for (int i = 1; i <= n; i++) { cin >> l[i]; } v.push_back(0); DFS(1); int s = v.size(); for (int i = 1; i <= s/2; i++) { int l = v[i]; int r = v[s - i]; if (l == r) { cout << "YES"; return 0; } } cout << "NO"; return 0; } 트리의 정가운데를 기준으로 나눠서 생각해보면 반대편에 있는 값이 서로 겹치지 않는 값이더라구요. 위 특성을 활용하면 이런 풀이도 가능한 것 같습니다.
바보같은 질문일 수 있겠지만 용기내어 해보겠습니다. 일단 저는 슬리액 백, 프론트 둘 다 구매해서 듣고있습니다. 슬리액 프론트 백을 참고해서 다른 프로젝트에 적용시켜보고 있는 과정에서 궁금한점이 생겼습니다. 여기서 mutate에 데이터를 넣고 swr data에 로그인 된 데이터가 들어가는걸로 이해를 했고, http://localhost:1010/auth/ 에서 GET 으로 API를 요청해서 데이터를 받아와서 페이지에서 유저가 로그인 되어있음을 알 수 있다고 이해했습니다. 그런데 서버단에서는 위에 있는 코드로 GET 요청을 해서 유저 정보를 가지고 오는건데 유저를 찾는 부분도 없는데 어떻게 들고 온다는 건지 모르겠습니다.
안녕하세요, 강의 잘 보고 있습니다. BlockOperation 자체는 Operation에 등록된 block들이 concurrent하게 실행된다고 나와 있고, 이걸 serial하게 실행하고 싶으면 이 BlockOperation을 maxConcurrentOperationCount를 1로 설정한 OperationQueue에 넣으면 된다고 하신 걸로 이해했습니다. 그래서 다음과 같이 코드를 작성하고 돌려봤는데, 등록한 block의 순서대로 print되지 않는 걸 봐서는 serial하게 실행되지 않는 것 같습니다. let operation = BlockOperation() for i in 0 ..< 1000 { operation.addExecutionBlock { print(i, Thread.current) } } let queue = OperationQueue() queue.maxConcurrentOperationCount = 1 queue.addOperation(operation) 이 코드를 실행하면 i가 0부터 999까지 순서대로 프린트되지 않고 랜덤하게 프린트됩니다. let queue = OperationQueue() queue.maxConcurrentOperationCount = 1 for i in 0 ..< 1000 { queue.addOperation { print(i, Thread.current) } } 반면에 위처럼 BlockOperation을 사용하지 않고 maxConcurrentOpreationCount가 1인 OperationQueue에 block을 순서대로 추가하면, 이전에 설명해주신 대로 serial하게 실행되어 0부터 999까지 차례대로 프린트됩니다. Thread.current의 프린트 결과를 봐도 두 번째 코드보다 첫 번째 코드에서 더 많은 쓰레드를 사용하는 것으로 보입니다. (질문과는 관계 없긴 한데, 이 과정에서 OperationQueue가 항상 동일한 쓰레드를 사용해서 Operation을 실행하지는 않는다는 것을 확인했습니다. 반면 serial하게 동작하는 커스텀 DispatchQueue는 항상 동일한 쓰레드를 사용하는 것으로 확인했습니다. maxConcurrentOperationCount가 1인 OperationQueue는 항상 동일한 쓰레드를 사용하지는 않더라구요. 사실 maxConcurrentOperationCount가 말 그대로 concurrent하게 실행될 수 있는 Operation의 개수를 말하는 것이지, 실행될 수 있는 쓰레드의 개수를 말하는 건 아니니까 이건 이것 나름대로 이해한 것 같습니다.) executionBlocks를 얻어서 좀 더 봐보려고 했는데 잘 안되더라구요. 혹시 이 부분 관련해서 제가 잘못 이해한 부분이 있는지, 아니면 추가 설명을 부탁드릴 수 있을까요? 감사합니다.
안녕하세요. 작업형 2유형에서 강의 주신 범위에서는 train과 test가 주어지던가 X train, Y train, X test로 주어지는 두 가지 방향에 대해서 말씀 해주셨는데요. 만약 train data 한 개만 주어지는 경우도 생길까요? 이러한 경우, x_train, y_train, x_test, y_test를 각각 나누어 예측 및 분류 모형을 만들 수 있도록 data partition 코드 설명 가능 할까요?
제목과 같습니다. 맥북-아이패드 사이드카로 강의 시청시 화면이 검게 나옵니다. 일정 시간 시청 후(아마 5분 짜리 강의 한개 들은 후 다음 강의 수강 시)에 검은 화면에서 화면이 보이지 않네요. 모든 강의가 그렇습니다. 맥북 에어라 화면이 작아서 사이드카로 보려는데 위 문제 발생해서 사이드카를 해제해보니 바로 정상적으로 나왔습니다. 아이패드 앱으로 보기엔 앱이 불편해서 사이드카로 보려는데.. 문제가 생기네요 ㅠ 이전에 사이드카로 들었을 때는 문제가 없었습니다. 확인 부탁드립니다.
리액트 프로젝트를 할 때 모두 CRA로 초기 세팅을 잡고 시작했었는데 이번에 강의를 수강하게 된 이유가 CRA로 세팅하지 않고 처음부터 세팅한다는 점에 있었는데요, 그래서 alecture 폴더를 모두 지우고 다시 만든 후 npm init을 쳤는데 그대로 소스가 옮겨져오더라구요 컴포넌트 폴더 , 페이지 폴더 등등 하위 소스까지 모두 다요 혹시 어떤 부분 때문에 이렇게 모두 다시 생성이 되는지 여쭤봐도 될까요? git clone 이후 진행하였습니다.
일단 상품등록하는데 문제는 없습니다. 위와 연결된 Controller에 매핑과 BookForm 설정 똑같이 했는데 강의에 영한님이 한것처럼 html에서 th:object="${form}" 나 th:field="*{name}" 을 command+click 으로 연결된곳으로 갈수도 없고 Cannot resolve 'form' 오류 뜨면서 빨간줄 그어지는데 해결할수 있는 방법있을까요? 저도 그 편한 기능 쓰고 싶습니다 진짜루 ..ㅠㅠ 인텔리제이는 IntelliJ IDEA 2022.1.2 (Ultimate Edition) 쓰고 있습니다.