묻고 답해요
141만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결토비의 스프링 부트 - 이해와 원리
스프링의 장점
안녕하세요. 토비님 강의 너무 잘듣고 있습니다. 강의를 듣다가 궁금한점이 생겨서 질문남깁니다.우선 저는 독립형 스프링 애플리케이션까지 들었습니다. 강의를 들으면서 스프링과 스프링 부트의 차이점과 이점은 이해가 쉽게 됐습니다. 하지만 서블릿 웹서버와 스프링 웹서버의 차이점에 대해서는 명확하게 이해하지 못했습니다.독립 실행형 서블릿 애플리케이션으로 웹 서버를 띄우는 것보다 독립 실행형 스프링 애플리케이션으로 웹 서버를 구성하는 것이 어떤 장점이 있는지 궁금합니다. 제가 이해한 바로는 서블릿 웹서버는 HTTP요청이 들어오면 컨테이너가 서블릿을 Mapping하고 서블릿이 요청을 처리하는 것이고 스프링 웹서버는 서블릿에서 스프링 컨테이너를 이용해서 요청을 처리하는 것입니다.혹여나 개념을 잘못 이해하고 있거나 뒷 내용에 이것에 대한 내용이 나온다면 알려주시면 감사하겠습니다.
-
해결됨토비의 스프링 부트 - 이해와 원리
BooleanCondition 동작 질문
토비님. 안녕하세요!다름이 아니라 '스프링부트의 @Conditional' 항목을 공부하던 중에 conditional() 테스트 코드가 어떻게 동작할지 생각해보았습니다. 저는 true과 false가 1번씩 호출될 것이라고 추측을 했었는데, true가 3번이 호출되어서 생각과는 다른 결과를 확인하였습니다. 제가 무언가를 잘못 알고 있는 것 같아서 확인해보고 싶습니다. 어떠한 키워드로 알아보면 이것에 대해서 알 수 있을까요? 잘려서 보이지 않는 윗부분의 소스 코드는 강의 내용과 다른 점이 없이 작성되어있습니다.
-
해결됨토비의 스프링 부트 - 이해와 원리
자료가 비어있습니다.
수업자료가 비어있어서 비슷한 문제로 글 올리신분들이 몇 있으시던데,보인다고 하시는 분들이 있으나...저는 수업자료를 다운받으니 폴더가 비어있습니다.
-
해결됨토비의 스프링 부트 - 이해와 원리
테스트가 dataSource Bean을 읽어오지 못합니다.
토비님 강의랑 동일하게 설정했는데 동작을 안하네요 지금 @JdbcTest로 해결은 했는데 왜 읽어오지 못하는지 궁금합니다.예전 토비님 책 보면 xml을 읽어와서 빈을 넣어준 걸로 알고 있는데 classes는 어떻게 동작해서 저걸 못읽어오는걸까요?
-
미해결토비의 스프링 부트 - 이해와 원리
HikariDataSource가 존재하지 않는 이슈가 있습니다.
토비님이랑 같은 의존성 주입 받았는데 전 HikariDataSource라는 class가 존재하지 않습니다. 제가 잘못한게 있을까요
-
해결됨토비의 스프링 부트 - 이해와 원리
JmxAutoConfiguration가 Nagative matches 리스트에있습니다
이니셜라이저는 다음처럼 구성했고인텔리제이 커뮤니티 에디션을 사용해서 프로젝트를 열고 -Ddebug 를 주고 실행했을 때콘솔 결과는 다음과 같습니다.오전 8:52:26: Executing ':SpringbootAcApplication.main()'...> Task :compileJava UP-TO-DATE> Task :processResources UP-TO-DATE> Task :classes UP-TO-DATE> Task :SpringbootAcApplication.main(). ____ _/\\ / ___'_ __ (_)_ _ \ \ \ \( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \\\/ ___)| |_)| | | | | || (_| | ) ) ) )' |____| .__|_| |_|_| |_\__, | / / / /=========|_|==============|___/=/_/_/_/:: Spring Boot :: (v2.7.8)2023-02-05 08:52:27.975 INFO 28856 --- [ main] c.e.s.SpringbootAcApplication : Starting SpringbootAcApplication using Java 11.0.18 on DESKTOP-010ET15 with PID 28856 (G:\Workspace_2023\Server\springboot-ac\build\classes\java\main started by doseon in G:\Workspace_2023\Server\springboot-ac)2023-02-05 08:52:27.978 INFO 28856 --- [ main] c.e.s.SpringbootAcApplication : No active profile set, falling back to 1 default profile: "default"2023-02-05 08:52:27.978 DEBUG 28856 --- [ main] o.s.boot.SpringApplication : Loading source class com.example.springbootac.SpringbootAcApplication2023-02-05 08:52:28.628 DEBUG 28856 --- [ main] ConditionEvaluationReportLoggingListener :============================CONDITIONS EVALUATION REPORT============================Positive matches:-----------------AopAutoConfiguration matched:- @ConditionalOnProperty (spring.aop.auto=true) matched (OnPropertyCondition)AopAutoConfiguration.ClassProxyingConfiguration matched:- @ConditionalOnMissingClass did not find unwanted class 'org.aspectj.weaver.Advice' (OnClassCondition)- @ConditionalOnProperty (spring.aop.proxy-target-class=true) matched (OnPropertyCondition)GenericCacheConfiguration matched:- Cache org.springframework.boot.autoconfigure.cache.GenericCacheConfiguration automatic cache type (CacheCondition)LifecycleAutoConfiguration#defaultLifecycleProcessor matched:- @ConditionalOnMissingBean (names: lifecycleProcessor; SearchStrategy: current) did not find any beans (OnBeanCondition)NoOpCacheConfiguration matched:- Cache org.springframework.boot.autoconfigure.cache.NoOpCacheConfiguration automatic cache type (CacheCondition)PropertyPlaceholderAutoConfiguration#propertySourcesPlaceholderConfigurer matched:- @ConditionalOnMissingBean (types: org.springframework.context.support.PropertySourcesPlaceholderConfigurer; SearchStrategy: current) did not find any beans (OnBeanCondition)SimpleCacheConfiguration matched:- Cache org.springframework.boot.autoconfigure.cache.SimpleCacheConfiguration automatic cache type (CacheCondition)SqlInitializationAutoConfiguration matched:- @ConditionalOnProperty (spring.sql.init.enabled) matched (OnPropertyCondition)- NoneNestedConditions 0 matched 1 did not; NestedCondition on SqlInitializationAutoConfiguration.SqlInitializationModeCondition.ModeIsNever @ConditionalOnProperty (spring.sql.init.mode=never) did not find property 'mode' (SqlInitializationAutoConfiguration.SqlInitializationModeCondition)TaskExecutionAutoConfiguration matched:- @ConditionalOnClass found required class 'org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor' (OnClassCondition)TaskExecutionAutoConfiguration#applicationTaskExecutor matched:- @ConditionalOnMissingBean (types: java.util.concurrent.Executor; SearchStrategy: all) did not find any beans (OnBeanCondition)TaskExecutionAutoConfiguration#taskExecutorBuilder matched:- @ConditionalOnMissingBean (types: org.springframework.boot.task.TaskExecutorBuilder; SearchStrategy: all) did not find any beans (OnBeanCondition)TaskSchedulingAutoConfiguration matched:- @ConditionalOnClass found required class 'org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler' (OnClassCondition)TaskSchedulingAutoConfiguration#taskSchedulerBuilder matched:- @ConditionalOnMissingBean (types: org.springframework.boot.task.TaskSchedulerBuilder; SearchStrategy: all) did not find any beans (OnBeanCondition)Negative matches:-----------------ActiveMQAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'javax.jms.ConnectionFactory' (OnClassCondition)AopAutoConfiguration.AspectJAutoProxyingConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.aspectj.weaver.Advice' (OnClassCondition)ArtemisAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'javax.jms.ConnectionFactory' (OnClassCondition)BatchAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.batch.core.launch.JobLauncher' (OnClassCondition)Cache2kCacheConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.cache2k.Cache2kBuilder' (OnClassCondition)CacheAutoConfiguration:Did not match:- @ConditionalOnBean (types: org.springframework.cache.interceptor.CacheAspectSupport; SearchStrategy: all) did not find any beans of type org.springframework.cache.interceptor.CacheAspectSupport (OnBeanCondition)Matched:- @ConditionalOnClass found required class 'org.springframework.cache.CacheManager' (OnClassCondition)CacheAutoConfiguration.CacheManagerEntityManagerFactoryDependsOnPostProcessor:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean' (OnClassCondition)- Ancestor org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration did not match (ConditionEvaluationReport.AncestorsMatchedCondition)CaffeineCacheConfiguration:Did not match:- @ConditionalOnClass did not find required class 'com.github.benmanes.caffeine.cache.Caffeine' (OnClassCondition)CassandraAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'com.datastax.oss.driver.api.core.CqlSession' (OnClassCondition)CassandraDataAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'com.datastax.oss.driver.api.core.CqlSession' (OnClassCondition)CassandraReactiveDataAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'com.datastax.oss.driver.api.core.CqlSession' (OnClassCondition)CassandraReactiveRepositoriesAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.data.cassandra.ReactiveSession' (OnClassCondition)CassandraRepositoriesAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'com.datastax.oss.driver.api.core.CqlSession' (OnClassCondition)ClientHttpConnectorAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.web.reactive.function.client.WebClient' (OnClassCondition)CodecsAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.http.codec.CodecConfigurer' (OnClassCondition)CouchbaseAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'com.couchbase.client.java.Cluster' (OnClassCondition)CouchbaseCacheConfiguration:Did not match:- @ConditionalOnClass did not find required class 'com.couchbase.client.java.Cluster' (OnClassCondition)CouchbaseDataAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'com.couchbase.client.java.Bucket' (OnClassCondition)CouchbaseReactiveDataAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'com.couchbase.client.java.Cluster' (OnClassCondition)CouchbaseReactiveRepositoriesAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'com.couchbase.client.java.Cluster' (OnClassCondition)CouchbaseRepositoriesAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'com.couchbase.client.java.Bucket' (OnClassCondition)DataSourceAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType' (OnClassCondition)DataSourceInitializationConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.jdbc.datasource.init.DatabasePopulator' (OnClassCondition)DataSourceTransactionManagerAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.jdbc.core.JdbcTemplate' (OnClassCondition)DispatcherServletAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.web.servlet.DispatcherServlet' (OnClassCondition)EhCacheCacheConfiguration:Did not match:- @ConditionalOnClass did not find required class 'net.sf.ehcache.Cache' (OnClassCondition)ElasticsearchDataAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate' (OnClassCondition)ElasticsearchRepositoriesAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.elasticsearch.client.Client' (OnClassCondition)ElasticsearchRestClientAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.elasticsearch.client.RestClientBuilder' (OnClassCondition)EmbeddedLdapAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'com.unboundid.ldap.listener.InMemoryDirectoryServer' (OnClassCondition)EmbeddedMongoAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'com.mongodb.MongoClientSettings' (OnClassCondition)EmbeddedWebServerFactoryCustomizerAutoConfiguration:Did not match:- @ConditionalOnWebApplication did not find reactive or servlet web application classes (OnWebApplicationCondition)ErrorMvcAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'javax.servlet.Servlet' (OnClassCondition)ErrorWebFluxAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.web.reactive.config.WebFluxConfigurer' (OnClassCondition)FlywayAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.flywaydb.core.Flyway' (OnClassCondition)FreeMarkerAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'freemarker.template.Configuration' (OnClassCondition)GraphQlAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'graphql.GraphQL' (OnClassCondition)GraphQlQueryByExampleAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'graphql.GraphQL' (OnClassCondition)GraphQlQuerydslAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'graphql.GraphQL' (OnClassCondition)GraphQlRSocketAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'graphql.GraphQL' (OnClassCondition)GraphQlReactiveQueryByExampleAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'graphql.GraphQL' (OnClassCondition)GraphQlReactiveQuerydslAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'graphql.GraphQL' (OnClassCondition)GraphQlWebFluxAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'graphql.GraphQL' (OnClassCondition)GraphQlWebFluxSecurityAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'graphql.GraphQL' (OnClassCondition)GraphQlWebMvcAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'graphql.GraphQL' (OnClassCondition)GraphQlWebMvcSecurityAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'graphql.GraphQL' (OnClassCondition)GroovyTemplateAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'groovy.text.markup.MarkupTemplateEngine' (OnClassCondition)GsonAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'com.google.gson.Gson' (OnClassCondition)H2ConsoleAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.h2.server.web.WebServlet' (OnClassCondition)HazelcastAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'com.hazelcast.core.HazelcastInstance' (OnClassCondition)HazelcastCacheConfiguration:Did not match:- @ConditionalOnClass did not find required class 'com.hazelcast.core.HazelcastInstance' (OnClassCondition)HazelcastJpaDependencyAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'com.hazelcast.core.HazelcastInstance' (OnClassCondition)HibernateJpaAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'javax.persistence.EntityManager' (OnClassCondition)HttpEncodingAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.web.filter.CharacterEncodingFilter' (OnClassCondition)HttpHandlerAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.http.server.reactive.HttpHandler' (OnClassCondition)HttpMessageConvertersAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.http.converter.HttpMessageConverter' (OnClassCondition)HypermediaAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.hateoas.EntityModel' (OnClassCondition)InfinispanCacheConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.infinispan.spring.embedded.provider.SpringEmbeddedCacheManager' (OnClassCondition)InfluxDbAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.influxdb.InfluxDB' (OnClassCondition)IntegrationAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.integration.config.EnableIntegration' (OnClassCondition)JCacheCacheConfiguration:Did not match:- @ConditionalOnClass did not find required class 'javax.cache.Caching' (OnClassCondition)JacksonAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'com.fasterxml.jackson.databind.ObjectMapper' (OnClassCondition)JdbcRepositoriesAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.data.jdbc.repository.config.AbstractJdbcConfiguration' (OnClassCondition)JdbcTemplateAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.jdbc.core.JdbcTemplate' (OnClassCondition)JerseyAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'javax.servlet.ServletRegistration' (OnClassCondition)JmsAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'javax.jms.Message' (OnClassCondition)JmxAutoConfiguration:Did not match:- @ConditionalOnProperty (spring.jmx.enabled=true) did not find property 'enabled' (OnPropertyCondition)Matched:- @ConditionalOnClass found required class 'org.springframework.jmx.export.MBeanExporter' (OnClassCondition)JndiConnectionFactoryAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.jms.core.JmsTemplate' (OnClassCondition)JndiDataSourceAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType' (OnClassCondition)JooqAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.jooq.DSLContext' (OnClassCondition)JpaRepositoriesAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.data.jpa.repository.JpaRepository' (OnClassCondition)JsonbAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'javax.json.bind.Jsonb' (OnClassCondition)JtaAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'javax.transaction.Transaction' (OnClassCondition)KafkaAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.kafka.core.KafkaTemplate' (OnClassCondition)LdapAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.ldap.core.ContextSource' (OnClassCondition)LdapRepositoriesAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.data.ldap.repository.LdapRepository' (OnClassCondition)LiquibaseAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'liquibase.change.DatabaseChange' (OnClassCondition)MailSenderAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'javax.activation.MimeType' (OnClassCondition)MailSenderValidatorAutoConfiguration:Did not match:- @ConditionalOnSingleCandidate did not find required type 'org.springframework.mail.javamail.JavaMailSenderImpl' (OnBeanCondition)MessageSourceAutoConfiguration:Did not match:- ResourceBundle did not find bundle with basename messages (MessageSourceAutoConfiguration.ResourceBundleCondition)MongoAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'com.mongodb.client.MongoClient' (OnClassCondition)MongoDataAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'com.mongodb.client.MongoClient' (OnClassCondition)MongoReactiveAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'com.mongodb.reactivestreams.client.MongoClient' (OnClassCondition)MongoReactiveDataAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'com.mongodb.reactivestreams.client.MongoClient' (OnClassCondition)MongoReactiveRepositoriesAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'com.mongodb.reactivestreams.client.MongoClient' (OnClassCondition)MongoRepositoriesAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'com.mongodb.client.MongoClient' (OnClassCondition)MultipartAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'javax.servlet.MultipartConfigElement' (OnClassCondition)MustacheAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'com.samskivert.mustache.Mustache' (OnClassCondition)Neo4jAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.neo4j.driver.Driver' (OnClassCondition)Neo4jDataAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.neo4j.driver.Driver' (OnClassCondition)Neo4jReactiveDataAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.neo4j.driver.Driver' (OnClassCondition)Neo4jReactiveRepositoriesAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.neo4j.driver.Driver' (OnClassCondition)Neo4jRepositoriesAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.neo4j.driver.Driver' (OnClassCondition)NettyAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'io.netty.util.NettyRuntime' (OnClassCondition)OAuth2ClientAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.security.config.annotation.web.configuration.EnableWebSecurity' (OnClassCondition)OAuth2ResourceServerAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.security.oauth2.server.resource.BearerTokenAuthenticationToken' (OnClassCondition)PersistenceExceptionTranslationAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor' (OnClassCondition)ProjectInfoAutoConfiguration#buildProperties:Did not match:- @ConditionalOnResource did not find resource '${spring.info.build.location:classpath:META-INF/build-info.properties}' (OnResourceCondition)ProjectInfoAutoConfiguration#gitProperties:Did not match:- GitResource did not find git info at classpath:git.properties (ProjectInfoAutoConfiguration.GitResourceAvailableCondition)QuartzAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.quartz.Scheduler' (OnClassCondition)R2dbcAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'io.r2dbc.spi.ConnectionFactory' (OnClassCondition)R2dbcDataAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.data.r2dbc.core.R2dbcEntityTemplate' (OnClassCondition)R2dbcInitializationConfiguration:Did not match:- @ConditionalOnClass did not find required classes 'io.r2dbc.spi.ConnectionFactory', 'org.springframework.r2dbc.connection.init.DatabasePopulator' (OnClassCondition)R2dbcRepositoriesAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'io.r2dbc.spi.ConnectionFactory' (OnClassCondition)R2dbcTransactionManagerAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.r2dbc.connection.R2dbcTransactionManager' (OnClassCondition)RSocketGraphQlClientAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'graphql.GraphQL' (OnClassCondition)RSocketMessagingAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'io.rsocket.RSocket' (OnClassCondition)RSocketRequesterAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'io.rsocket.RSocket' (OnClassCondition)RSocketSecurityAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.security.rsocket.core.SecuritySocketAcceptorInterceptor' (OnClassCondition)RSocketServerAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'io.rsocket.core.RSocketServer' (OnClassCondition)RSocketStrategiesAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'io.netty.buffer.PooledByteBufAllocator' (OnClassCondition)RabbitAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'com.rabbitmq.client.Channel' (OnClassCondition)ReactiveElasticsearchRepositoriesAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.data.elasticsearch.client.reactive.ReactiveElasticsearchClient' (OnClassCondition)ReactiveElasticsearchRestClientAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'reactor.netty.http.client.HttpClient' (OnClassCondition)ReactiveMultipartAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.http.codec.multipart.DefaultPartHttpMessageReader' (OnClassCondition)ReactiveOAuth2ClientAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'reactor.core.publisher.Flux' (OnClassCondition)ReactiveOAuth2ResourceServerAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.security.config.annotation.web.reactive.EnableWebFluxSecurity' (OnClassCondition)ReactiveSecurityAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'reactor.core.publisher.Flux' (OnClassCondition)ReactiveUserDetailsServiceAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.security.authentication.ReactiveAuthenticationManager' (OnClassCondition)ReactiveWebServerFactoryAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.http.ReactiveHttpInputMessage' (OnClassCondition)RedisAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.data.redis.core.RedisOperations' (OnClassCondition)RedisCacheConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.data.redis.connection.RedisConnectionFactory' (OnClassCondition)RedisReactiveAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'reactor.core.publisher.Flux' (OnClassCondition)RedisRepositoriesAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.data.redis.repository.configuration.EnableRedisRepositories' (OnClassCondition)RepositoryRestMvcAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration' (OnClassCondition)RestTemplateAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.web.client.RestTemplate' (OnClassCondition)Saml2RelyingPartyAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.security.saml2.provider.service.registration.RelyingPartyRegistrationRepository' (OnClassCondition)SecurityAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.security.authentication.DefaultAuthenticationEventPublisher' (OnClassCondition)SecurityFilterAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.security.config.http.SessionCreationPolicy' (OnClassCondition)SendGridAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'com.sendgrid.SendGrid' (OnClassCondition)ServletWebServerFactoryAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'javax.servlet.ServletRequest' (OnClassCondition)SessionAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.session.Session' (OnClassCondition)SolrAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.apache.solr.client.solrj.impl.CloudSolrClient' (OnClassCondition)SpringApplicationAdminJmxAutoConfiguration:Did not match:- @ConditionalOnProperty (spring.application.admin.enabled=true) did not find property 'enabled' (OnPropertyCondition)SpringDataWebAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.data.web.PageableHandlerMethodArgumentResolver' (OnClassCondition)TaskSchedulingAutoConfiguration#scheduledBeanLazyInitializationExcludeFilter:Did not match:- @ConditionalOnBean (names: org.springframework.context.annotation.internalScheduledAnnotationProcessor; SearchStrategy: all) did not find any beans named org.springframework.context.annotation.internalScheduledAnnotationProcessor (OnBeanCondition)TaskSchedulingAutoConfiguration#taskScheduler:Did not match:- @ConditionalOnBean (names: org.springframework.context.annotation.internalScheduledAnnotationProcessor; SearchStrategy: all) did not find any beans named org.springframework.context.annotation.internalScheduledAnnotationProcessor (OnBeanCondition)ThymeleafAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.thymeleaf.spring5.SpringTemplateEngine' (OnClassCondition)TransactionAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.transaction.PlatformTransactionManager' (OnClassCondition)UserDetailsServiceAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.security.authentication.AuthenticationManager' (OnClassCondition)ValidationAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'javax.validation.executable.ExecutableValidator' (OnClassCondition)WebClientAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.web.reactive.function.client.WebClient' (OnClassCondition)WebFluxAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.web.reactive.config.WebFluxConfigurer' (OnClassCondition)WebMvcAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'javax.servlet.Servlet' (OnClassCondition)WebServiceTemplateAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.oxm.Marshaller' (OnClassCondition)WebServicesAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.ws.transport.http.MessageDispatcherServlet' (OnClassCondition)WebSessionIdResolverAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'reactor.core.publisher.Mono' (OnClassCondition)WebSocketMessagingAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer' (OnClassCondition)WebSocketReactiveAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'javax.servlet.Servlet' (OnClassCondition)WebSocketServletAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'javax.servlet.Servlet' (OnClassCondition)XADataSourceAutoConfiguration:Did not match:- @ConditionalOnClass did not find required class 'javax.transaction.TransactionManager' (OnClassCondition)Exclusions:-----------NoneUnconditional classes:----------------------org.springframework.boot.autoconfigure.context.ConfigurationPropertiesAutoConfigurationorg.springframework.boot.autoconfigure.context.LifecycleAutoConfigurationorg.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfigurationorg.springframework.boot.autoconfigure.availability.ApplicationAvailabilityAutoConfigurationorg.springframework.boot.autoconfigure.info.ProjectInfoAutoConfiguration2023-02-05 08:52:28.659 INFO 28856 --- [ main] c.e.s.SpringbootAcApplication : Started SpringbootAcApplication in 1.188 seconds (JVM running for 1.655)2023-02-05 08:52:28.666 DEBUG 28856 --- [ main] o.s.b.a.ApplicationAvailabilityBean : Application availability state LivenessState changed to CORRECT2023-02-05 08:52:28.670 DEBUG 28856 --- [ main] o.s.b.a.ApplicationAvailabilityBean : Application availability state ReadinessState changed to ACCEPTING_TRAFFICDeprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.See https://docs.gradle.org/7.6/userguide/command_line_interface.html#sec:command_line_warningsBUILD SUCCESSFUL in 2s3 actionable tasks: 1 executed, 2 up-to-date오전 8:52:28: Execution finished ':SpringbootAcApplication.main()'.
-
미해결토비의 스프링 부트 - 이해와 원리
프로퍼티 빈의 후처리기 도입 강의 질문입니다
13:48 ~ 13:53 강의 중에@EnableMyConfigurationProperties(ServerProperties.class)@EnableMyConfigurationProperties 에 엘리먼트 정의를 안해주셨다고 설명해 주신 뒤Class<?> 만 치고 강의가 넘어가는 현상이 있습니다.
-
해결됨토비의 스프링 부트 - 이해와 원리
HelloController의 applicationContext 생성자 주입
안녕하세요.강의를 잘 듣고 있습니다! 다름이 아니라, Bean의 생명주기 메소드 강의에서 마지막 부분이 HelloController의 applicationContext를 생성자 주입하는 코드로 변경하면서 끝이 납니다. 그런데 DI와 단위 테스트 강의에서 HelloController의 테스트 코드를 작성할 때 보여주시는 HelloController.java의 코드를 보면 applicationContext를 생성자에서 파라미터로 받는 부분이 없어져 있습니다. 2개의 강의 사이에서 applicationContext를 파라미터로 받는 코드를 리팩토링하는 부분을 설명해주시는 부분이 제가 찾기에는 보이지 않아서... 혹시 보충 설명을 해주시면 감사하겠습니다.
-
해결됨토비의 스프링 부트 - 이해와 원리
Context 오브젝트에서 클래스로더를 가져온 것과 현재 오브젝트에서 클래스 로더를 가져왔을 때 어떤 차이가 있나요?
안녕하세요. 강의 너무 재미있게 잘 듣고 있습니다. 강의 듣다가 클래스 로더를 가져오는 부분에서 의문점이 있는데요(사실 이전부터 개념이 명확하지 않아 어려움이 있었습니다)MyOnClassCondition 만들면서 context.getClassLoader() 이렇게 클래스 로더를 가져왔는데 이렇게 가져오는 것과 this.getClass().getClassLoader() 이렇게 가져오는 것이 어떠한 차이가 있는지 궁금합니다.둘다 동작은 잘 되거든요.스프링 부트와 크게 관련된건 아니라고 생각들지만 인터넷 글을 봐도 명확하게 이해가 잘 안되서 초고수 토비님께 문의드립니다. 명강의 감사합니다.!!
-
해결됨토비의 스프링 부트 - 이해와 원리
스프링 처음 배우는데..
우선 저는 스프링의 스 자도 모르는 상태에서, 토비님의 네임드만 보고 생각없이 후딱 구매해버렸습니다..!스프링부트를 듣는데 스프링 레거시, jsp, 서블릿 관련 자세한 지식 없이 강의 교안대로 가면 문제 없나요?
-
해결됨토비의 스프링 부트 - 이해와 원리
@Condtional 과 @Condition 질문입니다
강의 제목에 @Conditional 과 @Condition 이라고 나와 있어서 조금 헷갈렸는데애노테이션이나 인터페이스를 표현할 때 @ 를 붙여주는 것이 관례일까요?
-
해결됨토비의 스프링 부트 - 이해와 원리
[스프링 컨테이너 사용] 강의 중 getBean IDE 상 에러가 뜨는데 원래 그럴까요 ?
cannot acess 에러가 발생하는데,실제, 코드를 돌리면 컴파일 및 런타임 에러 없이 동작합니다.Access 에러 길래, 접근 제어자 문제로 판단하였으나, 전부 Public 이라 딱히 문제도 없는것 같은데, 저만 그런건지 궁금합니다.registerBean 에서도 해당 클래스를 불러오기 때문에, 여기서도 에러가 뜬다면 이해하겠으나..해당 부분은 문제없고.. 밑에서만 떠서... 궁금합니다[참고로, 실행하면 컴파일 에러 없이 실행 되고... IDE 상에서는 에러로 계속 남아 있습니다. ] package com.example.helloboot; import org.apache.catalina.startup.Tomcat; import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory; import org.springframework.boot.web.server.WebServer; import org.springframework.boot.web.servlet.ServletContextInitializer; import org.springframework.context.support.GenericApplicationContext; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; public class HellobootApplication { public static void main(String[] args) { // Spring Container 생성 Context 가 Container 임 // 컨테이너 생성 GenericApplicationContext applicationContext = new GenericApplicationContext(); // 오브젝트 (빈) 등록 applicationContext.registerBean(HelloController.class); // 오브젝트 생성 요청 applicationContext.refresh(); // [Step 1] Servlet 컨테이너 생성 // Factory 생성과 설정 작업등을 대신 해주는 대상 TomcatServletWebServerFactory serverFactory = new TomcatServletWebServerFactory(); WebServer webServer = serverFactory.getWebServer(servletContext -> { servletContext.addServlet("frontcontroller", new HttpServlet() { @Override protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { // 인증, 보안 , 다국어, 공통 기능 등 처리 if (req.getRequestURI().equals("/hello") && req.getMethod().equals(HttpMethod.GET.name())) { String name = req.getParameter("name"); // binding 데이터를 처리하는 오브젝트에 데이터를 넘기는 것 HelloController helloController = applicationContext.getBean(HelloController.class); String ret = helloController.hello(name); resp.setContentType(MediaType.TEXT_PLAIN_VALUE); resp.getWriter().println(ret); } else { resp.setStatus(HttpStatus.NOT_FOUND.value()); } } }).addMapping("/*"); }); webServer.start(); } }
-
해결됨토비의 스프링 부트 - 이해와 원리
부트 3.0 사용하시는 분들은 @RequestMapping 만으로 매핑이 등록되지 않으니 참고하세요.
부트 3.0과 스프링 6.0이전 버전에서는 매핑 테이블에 핸들러로 등록되기 위해서는 클래스 레벨의 @RequestMapping 어노테이션만으로 가능했으나, 3.0부터는 클래스 레벨의 핸들러 감지 대상에 @Controller 어노테이션만이 포함된다고 합니다.https://github.com/spring-projects/spring-framework/issues/22154
-
해결됨토비의 스프링 부트 - 이해와 원리
토비님이 생각하시는 단위 테스트, 통합 테스트의 범위를 알려주실 수 있으신가요?
강의에서 말씀하신대로, 단위테스트 혹은 통합테스트와 같은 용어들이 단어가 느슨하게 정의되어 있어 블로그, 책, 강의마다 설명들이 다 달라서 면접 같은 곳에서 질문을 받으면 매우 곤란한데요. 단위 테스트, 통합 테스트 범위? 정의? 같은 것에 대한 토비님의 개인적인 의견 혹은 기준이 궁금합니다.
-
해결됨토비의 스프링 부트 - 이해와 원리
복잡한 decorator 예제
안녕하세요 토비님! 강의를 듣는 중에, 여러개의 데코레이터를 우선순위를 정하는 방법 말고 원하는 상황에 맞게 주입이 되도록 처리하는 방식에 대해 말씀해주셨는데, 해당 방법에 대해 좀더 자세하게 알고 싶어져서 사용하는 예제 코드를 구글링 해보았지만 못찾겠어서 질문 올립니다.
-
해결됨토비의 스프링 부트 - 이해와 원리
`@ConditionalOnClass` 관련 문의
안녕하세요! 강의에서 한가지 궁금한 점이 있어서 질문드립니다!@ConditionalOnClass 어노테이션에서 XmlMapper.class 는 빨간 줄로 나와서 찾아보니import com.fasterxml.jackson.dataformat.xml.XmlMapper;가 resolve 되지 못하는 것으로 추측되었습니다. 이런 경우는 빌드가 되지 않아야 하는 것이 아닌가 싶어서 제가 무엇을 놓치고 있는 것인지 알고 싶어 문의드립니다
-
해결됨토비의 스프링 부트 - 이해와 원리
공부 방법에 대해서 질문드립니다.
안녕하세요. 토비님저는 이제 곧 4년차가 되가는 개발자 입니다.토비님의 스프링 부트 강의가 나온다는 이야기를 듣고 바로 구매 후 강의를 듣고 있는데 진짜 너무 좋은 내용에 무한 반복을 하고 있으며, 이전에 토비님이 쓰신 토비의 스프링 3.1을 이전에 완독을 해볼려고 하다가, 도중에 다른 일 때문에 중단을 했었는데 요번에 다시 한번 읽어볼려고 합니다.평소 토비님처럼 개발자로서, 전문가가 되고 싶다는 생각을 항상 하고 있는데, 토비님께서는 어떻게 스프링이나 다른 기술들을 공부를 하시는지, 궁금합니다. 그리고 토비님께서 생각하시는 스프링 개발자라면 꼭 기본적으로 꼭 알아야 될 필수 기술이 어떤 건지도 궁금합니다.어떻게 토비님께서 기술 공부를 하시는지, 비법을 알려주신다면 정말 열심히 해보겠습니다!정말 좋은 강의를 내주셔서 감사합니다.다음 강의 기다리고 있습니다!!ㅎㅎ
-
해결됨토비의 스프링 부트 - 이해와 원리
imports 파일을 읽어오지 못하는 오류
안녕하세요!이번에 스프링부트를 수강하게 된 학생입니다.퀄리티 높은 수업을 제공해주셔서 감사합니다!다름이 아니라 "자동 구성 정보 파일 분리" 파트를 수강하던 중imports 파일을 생성하여 class 정보를 불러오는 부분에서 오류가 발생하여 질문글 남깁니다.MyAutoConfigImportSelector.java에서 selectImports 메소드를 사용할 때리턴 해주는 String 배열을 직접 입력해주는 아래와 같은 방법을 사용하여 작성했을 때는 서버가 정상적으로 실행되었습니다.return new String[] { "tobyspring.config.autoconfig.DispatcherServletConfig", "tobyspring.config.autoconfig.TomcatWebServerConfig" };그런데 classLoader를 사용하여 META-INF 하위에 생성한 imports 파일을 읽어오는 코드를 작성하여 실행하니 ServletWebServerFactory 빈을 찾을 수 없다는 오류가 발생하며 서버가 정상적으로 실행되지 않습니다...혹시 META-INF를 읽어오지 못하는 이유가 있을까요??
-
미해결토비의 스프링 부트 - 이해와 원리
kotlin에서 registerBean 컴파일 에러 해결법
kotlin으로 toby님의 강의를 따라다가다 안되는 부분이 발생하여 다른분들도 해결하시면 좋을 것 같아 공유차원에서 글 남깁니다! org.springframwork.context.support.registerBean을 impot하여 해결할 수 있습니다.관련 docs:https://docs.spring.io/spring-framework/docs/5.0.0.RELEASE/spring-framework-reference/kotlin.html import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory import org.springframework.boot.web.server.WebServer import org.springframework.boot.web.servlet.ServletContextInitializer import org.springframework.context.support.GenericApplicationContext import org.springframework.context.support.registerBean import org.springframework.http.HttpHeaders import org.springframework.http.HttpMethod import org.springframework.http.HttpStatus import org.springframework.http.MediaType import javax.servlet.http.HttpServlet import javax.servlet.http.HttpServletRequest import javax.servlet.http.HttpServletResponse class HellobootApplication fun main(args: Array<String>) { val myApplicationContext = ApplicationContext() myApplicationContext.registerSpringBean() val serverFactory: TomcatServletWebServerFactory = TomcatServletWebServerFactory() val webServer: WebServer = serverFactory.getWebServer( ServletContextInitializer { it.addServlet("frontController", FrontController::class.java) .addMapping("/*") } ) webServer.start() } class ApplicationContext{ fun getContext() = springApplicationContext fun registerSpringBean(){ springApplicationContext.apply{ registerBean<HelloController>() refresh() } } companion object{ val springApplicationContext: GenericApplicationContext = GenericApplicationContext() } } class FrontController: HttpServlet() { override fun service(request: HttpServletRequest?, response: HttpServletResponse?) { requireNotNull(request) requireNotNull(response) val springApplicationContext = ApplicationContext().getContext() val helloController = springApplicationContext.getBean(HelloController::class.java) //인증, 보안, 다국어, 공통 기능 처리 duplicateCode() if(request.requestURI == "/hello" && request.method == HttpMethod.GET.name ){ val name = request.getParameter("name") response.status = HttpStatus.OK.value() response.setHeader(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN_VALUE) response.writer.println(helloController.hello(name)) }else { response.status = HttpStatus.NOT_FOUND.value() } } } private fun duplicateCode(){}
-
해결됨토비의 스프링 부트 - 이해와 원리
스프링의 미래 질문
좋은강의 너무 감사드립니다.혹시 스프링 관련해서 여쭤보고 싶은게 있습니다.점점 더 Cloud 환경으로 가면서 SpringBoot 이외에 더 빨리 개발, 배포 할 수 있는Spring Quakers 라던가 micronaut 같은 프레임 워크들이 등장했는데업력, Spring 경력이 높으신 선배님으로서 위와 같은 프레임워크들이 추후에 더 성장해서Boot 만큼 많이 쓰이게 될 수 있을거라고 생각하시나요? 아니면 조금 반짝 하다가 Spring 진영이 더욱 발전해서 더 빠른 개발, 성능을 커버 할거라고 보시나요? 궁금합니다.앗 그리고 + GraalVm 의 미래도 궁금합니다.