diff --git a/.gradle/8.8/executionHistory/executionHistory.bin b/.gradle/8.8/executionHistory/executionHistory.bin index a131893..8c26e23 100644 Binary files a/.gradle/8.8/executionHistory/executionHistory.bin and b/.gradle/8.8/executionHistory/executionHistory.bin differ diff --git a/.gradle/8.8/executionHistory/executionHistory.lock b/.gradle/8.8/executionHistory/executionHistory.lock index 0003ba6..9f742d0 100644 Binary files a/.gradle/8.8/executionHistory/executionHistory.lock and b/.gradle/8.8/executionHistory/executionHistory.lock differ diff --git a/.gradle/8.8/fileHashes/fileHashes.bin b/.gradle/8.8/fileHashes/fileHashes.bin index ca58766..a27c900 100644 Binary files a/.gradle/8.8/fileHashes/fileHashes.bin and b/.gradle/8.8/fileHashes/fileHashes.bin differ diff --git a/.gradle/8.8/fileHashes/fileHashes.lock b/.gradle/8.8/fileHashes/fileHashes.lock index daa0156..f944698 100644 Binary files a/.gradle/8.8/fileHashes/fileHashes.lock and b/.gradle/8.8/fileHashes/fileHashes.lock differ diff --git a/.gradle/8.8/fileHashes/resourceHashesCache.bin b/.gradle/8.8/fileHashes/resourceHashesCache.bin index 3ddee71..b28be00 100644 Binary files a/.gradle/8.8/fileHashes/resourceHashesCache.bin and b/.gradle/8.8/fileHashes/resourceHashesCache.bin differ diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock index 2370faf..c671d26 100644 Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/.gradle/file-system.probe b/.gradle/file-system.probe index a8ab588..4f1727e 100644 Binary files a/.gradle/file-system.probe and b/.gradle/file-system.probe differ diff --git a/build/libs/drinktionary-0.0.1-SNAPSHOT-plain.jar b/build/libs/drinktionary-0.0.1-SNAPSHOT-plain.jar index 2b87363..1aa62ca 100644 Binary files a/build/libs/drinktionary-0.0.1-SNAPSHOT-plain.jar and b/build/libs/drinktionary-0.0.1-SNAPSHOT-plain.jar differ diff --git a/build/libs/drinktionary-0.0.1-SNAPSHOT.jar b/build/libs/drinktionary-0.0.1-SNAPSHOT.jar index 9a5fc68..6e145d5 100644 Binary files a/build/libs/drinktionary-0.0.1-SNAPSHOT.jar and b/build/libs/drinktionary-0.0.1-SNAPSHOT.jar differ diff --git a/build/reports/tests/test/classes/com.sunjoo.drinktionary.DrinktionaryApplicationTests.html b/build/reports/tests/test/classes/com.sunjoo.drinktionary.DrinktionaryApplicationTests.html index 17a7e42..04becf7 100644 --- a/build/reports/tests/test/classes/com.sunjoo.drinktionary.DrinktionaryApplicationTests.html +++ b/build/reports/tests/test/classes/com.sunjoo.drinktionary.DrinktionaryApplicationTests.html @@ -41,7 +41,7 @@

DrinktionaryApplicationTests

-
0.304s
+
0.297s

duration

@@ -79,7 +79,7 @@

Tests

contextLoads() -0.304s +0.297s passed @@ -87,8 +87,8 @@

Tests

Standard output

-
00:35:41.246 [Test worker] INFO org.springframework.test.context.support.AnnotationConfigContextLoaderUtils -- Could not detect default configuration classes for test class [com.sunjoo.drinktionary.DrinktionaryApplicationTests]: DrinktionaryApplicationTests does not declare any static, non-private, non-final, nested classes annotated with @Configuration.
-00:35:41.298 [Test worker] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper -- Found @SpringBootConfiguration com.sunjoo.drinktionary.DrinktionaryApplication for test class com.sunjoo.drinktionary.DrinktionaryApplicationTests
+
15:35:14.268 [Test worker] INFO org.springframework.test.context.support.AnnotationConfigContextLoaderUtils -- Could not detect default configuration classes for test class [com.sunjoo.drinktionary.DrinktionaryApplicationTests]: DrinktionaryApplicationTests does not declare any static, non-private, non-final, nested classes annotated with @Configuration.
+15:35:14.322 [Test worker] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper -- Found @SpringBootConfiguration com.sunjoo.drinktionary.DrinktionaryApplication for test class com.sunjoo.drinktionary.DrinktionaryApplicationTests
   .   ____          _            __ _ _
  /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
 ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
@@ -98,23 +98,23 @@ 

Standard output

:: Spring Boot :: (v3.3.0) -2024-06-26T00:35:41.544+09:00 INFO 11058 --- [drinktionary] [ Test worker] c.s.d.DrinktionaryApplicationTests : Starting DrinktionaryApplicationTests using Java 17.0.9 with PID 11058 (started by Samsung in /Users/Samsung/Desktop/2024/sunjooProject/sunjoo-server-drinktionary) -2024-06-26T00:35:41.545+09:00 INFO 11058 --- [drinktionary] [ Test worker] c.s.d.DrinktionaryApplicationTests : No active profile set, falling back to 1 default profile: "default" -2024-06-26T00:35:41.912+09:00 INFO 11058 --- [drinktionary] [ Test worker] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. -2024-06-26T00:35:41.995+09:00 INFO 11058 --- [drinktionary] [ Test worker] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 79 ms. Found 2 JPA repository interfaces. -2024-06-26T00:35:42.131+09:00 INFO 11058 --- [drinktionary] [ Test worker] o.s.cloud.context.scope.GenericScope : BeanFactory id=41358a30-5206-331b-bebb-a7012c44171b -2024-06-26T00:35:42.210+09:00 WARN 11058 --- [drinktionary] [ Test worker] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.client.loadbalancer.LoadBalancerAutoConfiguration$DeferringLoadBalancerInterceptorConfig' of type [org.springframework.cloud.client.loadbalancer.LoadBalancerAutoConfiguration$DeferringLoadBalancerInterceptorConfig] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). The currently created BeanPostProcessor [lbRestClientPostProcessor] is declared through a non-static factory method on that class; consider declaring it as static instead. -2024-06-26T00:35:42.212+09:00 WARN 11058 --- [drinktionary] [ Test worker] trationDelegate$BeanPostProcessorChecker : Bean 'deferringLoadBalancerInterceptor' of type [org.springframework.cloud.client.loadbalancer.DeferringLoadBalancerInterceptor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [lbRestClientPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies. -2024-06-26T00:35:42.284+09:00 INFO 11058 --- [drinktionary] [ Test worker] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default] -2024-06-26T00:35:42.319+09:00 INFO 11058 --- [drinktionary] [ Test worker] org.hibernate.Version : HHH000412: Hibernate ORM core version 6.5.2.Final -2024-06-26T00:35:42.334+09:00 INFO 11058 --- [drinktionary] [ Test worker] o.h.c.internal.RegionFactoryInitiator : HHH000026: Second-level cache disabled -2024-06-26T00:35:42.478+09:00 INFO 11058 --- [drinktionary] [ Test worker] o.s.o.j.p.SpringPersistenceUnitInfo : No LoadTimeWeaver setup: ignoring JPA class transformer -2024-06-26T00:35:42.490+09:00 INFO 11058 --- [drinktionary] [ Test worker] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... -2024-06-26T00:35:42.591+09:00 INFO 11058 --- [drinktionary] [ Test worker] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection conn0: url=jdbc:h2:mem:sunjoo user=ROOT -2024-06-26T00:35:42.592+09:00 INFO 11058 --- [drinktionary] [ Test worker] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. -2024-06-26T00:35:42.605+09:00 WARN 11058 --- [drinktionary] [ Test worker] org.hibernate.orm.deprecation : HHH90000025: MySQL8Dialect does not need to be specified explicitly using 'hibernate.dialect' (remove the property setting and it will be selected by default) -2024-06-26T00:35:42.605+09:00 WARN 11058 --- [drinktionary] [ Test worker] org.hibernate.orm.deprecation : HHH90000026: MySQL8Dialect has been deprecated; use org.hibernate.dialect.MySQLDialect instead -2024-06-26T00:35:43.048+09:00 INFO 11058 --- [drinktionary] [ Test worker] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration) +2024-07-01T15:35:14.555+09:00 INFO 5719 --- [drinktionary] [ Test worker] c.s.d.DrinktionaryApplicationTests : Starting DrinktionaryApplicationTests using Java 17.0.9 with PID 5719 (started by Samsung in /Users/Samsung/Desktop/2024/sunjooProject/sunjoo-server-drinktionary) +2024-07-01T15:35:14.556+09:00 INFO 5719 --- [drinktionary] [ Test worker] c.s.d.DrinktionaryApplicationTests : No active profile set, falling back to 1 default profile: "default" +2024-07-01T15:35:14.923+09:00 INFO 5719 --- [drinktionary] [ Test worker] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. +2024-07-01T15:35:15.004+09:00 INFO 5719 --- [drinktionary] [ Test worker] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 77 ms. Found 2 JPA repository interfaces. +2024-07-01T15:35:15.132+09:00 INFO 5719 --- [drinktionary] [ Test worker] o.s.cloud.context.scope.GenericScope : BeanFactory id=41358a30-5206-331b-bebb-a7012c44171b +2024-07-01T15:35:15.208+09:00 WARN 5719 --- [drinktionary] [ Test worker] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.client.loadbalancer.LoadBalancerAutoConfiguration$DeferringLoadBalancerInterceptorConfig' of type [org.springframework.cloud.client.loadbalancer.LoadBalancerAutoConfiguration$DeferringLoadBalancerInterceptorConfig] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). The currently created BeanPostProcessor [lbRestClientPostProcessor] is declared through a non-static factory method on that class; consider declaring it as static instead. +2024-07-01T15:35:15.210+09:00 WARN 5719 --- [drinktionary] [ Test worker] trationDelegate$BeanPostProcessorChecker : Bean 'deferringLoadBalancerInterceptor' of type [org.springframework.cloud.client.loadbalancer.DeferringLoadBalancerInterceptor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [lbRestClientPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies. +2024-07-01T15:35:15.282+09:00 INFO 5719 --- [drinktionary] [ Test worker] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default] +2024-07-01T15:35:15.319+09:00 INFO 5719 --- [drinktionary] [ Test worker] org.hibernate.Version : HHH000412: Hibernate ORM core version 6.5.2.Final +2024-07-01T15:35:15.335+09:00 INFO 5719 --- [drinktionary] [ Test worker] o.h.c.internal.RegionFactoryInitiator : HHH000026: Second-level cache disabled +2024-07-01T15:35:15.491+09:00 INFO 5719 --- [drinktionary] [ Test worker] o.s.o.j.p.SpringPersistenceUnitInfo : No LoadTimeWeaver setup: ignoring JPA class transformer +2024-07-01T15:35:15.504+09:00 INFO 5719 --- [drinktionary] [ Test worker] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... +2024-07-01T15:35:15.608+09:00 INFO 5719 --- [drinktionary] [ Test worker] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection conn0: url=jdbc:h2:mem:sunjoo user=ROOT +2024-07-01T15:35:15.609+09:00 INFO 5719 --- [drinktionary] [ Test worker] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. +2024-07-01T15:35:15.621+09:00 WARN 5719 --- [drinktionary] [ Test worker] org.hibernate.orm.deprecation : HHH90000025: MySQL8Dialect does not need to be specified explicitly using 'hibernate.dialect' (remove the property setting and it will be selected by default) +2024-07-01T15:35:15.622+09:00 WARN 5719 --- [drinktionary] [ Test worker] org.hibernate.orm.deprecation : HHH90000026: MySQL8Dialect has been deprecated; use org.hibernate.dialect.MySQLDialect instead +2024-07-01T15:35:16.081+09:00 INFO 5719 --- [drinktionary] [ Test worker] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration) Hibernate: create table drink_info ( drink_id bigint not null auto_increment, @@ -143,21 +143,21 @@

Standard output

add constraint FKgd0cps943972ugi3a1swunxse foreign key (drink_id) references drink_info (drink_id) -2024-06-26T00:35:43.093+09:00 INFO 11058 --- [drinktionary] [ Test worker] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' -2024-06-26T00:35:43.303+09:00 WARN 11058 --- [drinktionary] [ Test worker] 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 -2024-06-26T00:35:43.675+09:00 INFO 11058 --- [drinktionary] [ Test worker] DiscoveryClientOptionalArgsConfiguration : Eureka HTTP Client uses RestTemplate. -2024-06-26T00:35:43.687+09:00 WARN 11058 --- [drinktionary] [ Test worker] iguration$LoadBalancerCaffeineWarnLogger : Spring Cloud LoadBalancer is currently working with the default cache. While this cache implementation is useful for development and tests, it's recommended to use Caffeine cache in production.You can switch to using Caffeine cache, by adding it and org.springframework.cache.caffeine.CaffeineCacheManager to the classpath. -2024-06-26T00:35:43.702+09:00 INFO 11058 --- [drinktionary] [ Test worker] o.s.c.n.eureka.InstanceInfoFactory : Setting initial instance status as: STARTING -2024-06-26T00:35:43.750+09:00 INFO 11058 --- [drinktionary] [ Test worker] com.netflix.discovery.DiscoveryClient : Initializing Eureka in region us-east-1 -2024-06-26T00:35:43.752+09:00 INFO 11058 --- [drinktionary] [ Test worker] c.n.d.s.r.aws.ConfigClusterResolver : Resolving eureka endpoints via configuration -2024-06-26T00:35:43.764+09:00 INFO 11058 --- [drinktionary] [ Test worker] com.netflix.discovery.DiscoveryClient : Disable delta property : true -2024-06-26T00:35:43.764+09:00 INFO 11058 --- [drinktionary] [ Test worker] com.netflix.discovery.DiscoveryClient : Single vip registry refresh property : null -2024-06-26T00:35:43.764+09:00 INFO 11058 --- [drinktionary] [ Test worker] com.netflix.discovery.DiscoveryClient : Force full registry fetch : false -2024-06-26T00:35:43.764+09:00 INFO 11058 --- [drinktionary] [ Test worker] com.netflix.discovery.DiscoveryClient : Application is null : false -2024-06-26T00:35:43.764+09:00 INFO 11058 --- [drinktionary] [ Test worker] com.netflix.discovery.DiscoveryClient : Registered Applications size is zero : true -2024-06-26T00:35:43.764+09:00 INFO 11058 --- [drinktionary] [ Test worker] com.netflix.discovery.DiscoveryClient : Application version is -1: true -2024-06-26T00:35:43.764+09:00 INFO 11058 --- [drinktionary] [ Test worker] com.netflix.discovery.DiscoveryClient : Getting all instance registry info from the eureka server -2024-06-26T00:35:43.961+09:00 INFO 11058 --- [drinktionary] [ Test worker] c.n.d.s.t.d.RedirectingEurekaHttpClient : Request execution error. endpoint=DefaultEndpoint{ serviceUrl='http://sunjoo-server-eureka-eureka-1:8761/eureka/}, exception=I/O error on GET request for "http://sunjoo-server-eureka-eureka-1:8761/eureka/apps/": sunjoo-server-eureka-eureka-1: nodename nor servname provided, or not known stacktrace=org.springframework.web.client.ResourceAccessException: I/O error on GET request for "http://sunjoo-server-eureka-eureka-1:8761/eureka/apps/": sunjoo-server-eureka-eureka-1: nodename nor servname provided, or not known +2024-07-01T15:35:16.122+09:00 INFO 5719 --- [drinktionary] [ Test worker] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' +2024-07-01T15:35:16.336+09:00 WARN 5719 --- [drinktionary] [ Test worker] 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 +2024-07-01T15:35:16.735+09:00 INFO 5719 --- [drinktionary] [ Test worker] DiscoveryClientOptionalArgsConfiguration : Eureka HTTP Client uses RestTemplate. +2024-07-01T15:35:16.748+09:00 WARN 5719 --- [drinktionary] [ Test worker] iguration$LoadBalancerCaffeineWarnLogger : Spring Cloud LoadBalancer is currently working with the default cache. While this cache implementation is useful for development and tests, it's recommended to use Caffeine cache in production.You can switch to using Caffeine cache, by adding it and org.springframework.cache.caffeine.CaffeineCacheManager to the classpath. +2024-07-01T15:35:16.763+09:00 INFO 5719 --- [drinktionary] [ Test worker] o.s.c.n.eureka.InstanceInfoFactory : Setting initial instance status as: STARTING +2024-07-01T15:35:16.812+09:00 INFO 5719 --- [drinktionary] [ Test worker] com.netflix.discovery.DiscoveryClient : Initializing Eureka in region us-east-1 +2024-07-01T15:35:16.814+09:00 INFO 5719 --- [drinktionary] [ Test worker] c.n.d.s.r.aws.ConfigClusterResolver : Resolving eureka endpoints via configuration +2024-07-01T15:35:16.825+09:00 INFO 5719 --- [drinktionary] [ Test worker] com.netflix.discovery.DiscoveryClient : Disable delta property : true +2024-07-01T15:35:16.826+09:00 INFO 5719 --- [drinktionary] [ Test worker] com.netflix.discovery.DiscoveryClient : Single vip registry refresh property : null +2024-07-01T15:35:16.826+09:00 INFO 5719 --- [drinktionary] [ Test worker] com.netflix.discovery.DiscoveryClient : Force full registry fetch : false +2024-07-01T15:35:16.826+09:00 INFO 5719 --- [drinktionary] [ Test worker] com.netflix.discovery.DiscoveryClient : Application is null : false +2024-07-01T15:35:16.826+09:00 INFO 5719 --- [drinktionary] [ Test worker] com.netflix.discovery.DiscoveryClient : Registered Applications size is zero : true +2024-07-01T15:35:16.826+09:00 INFO 5719 --- [drinktionary] [ Test worker] com.netflix.discovery.DiscoveryClient : Application version is -1: true +2024-07-01T15:35:16.826+09:00 INFO 5719 --- [drinktionary] [ Test worker] com.netflix.discovery.DiscoveryClient : Getting all instance registry info from the eureka server +2024-07-01T15:35:17.020+09:00 INFO 5719 --- [drinktionary] [ Test worker] c.n.d.s.t.d.RedirectingEurekaHttpClient : Request execution error. endpoint=DefaultEndpoint{ serviceUrl='http://sunjoo-server-eureka-eureka-1:8761/eureka/}, exception=I/O error on GET request for "http://sunjoo-server-eureka-eureka-1:8761/eureka/apps/": sunjoo-server-eureka-eureka-1: nodename nor servname provided, or not known stacktrace=org.springframework.web.client.ResourceAccessException: I/O error on GET request for "http://sunjoo-server-eureka-eureka-1:8761/eureka/apps/": sunjoo-server-eureka-eureka-1: nodename nor servname provided, or not known at org.springframework.web.client.RestTemplate.createResourceAccessException(RestTemplate.java:915) at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:895) at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:790) @@ -358,8 +358,8 @@

Standard output

at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:889) ... 159 more -2024-06-26T00:35:43.963+09:00 WARN 11058 --- [drinktionary] [ Test worker] c.n.d.s.t.d.RetryableEurekaHttpClient : Request execution failed with message: I/O error on GET request for "http://sunjoo-server-eureka-eureka-1:8761/eureka/apps/": sunjoo-server-eureka-eureka-1: nodename nor servname provided, or not known -2024-06-26T00:35:43.964+09:00 INFO 11058 --- [drinktionary] [ Test worker] com.netflix.discovery.DiscoveryClient : DiscoveryClient_DRINKTIONARY/192.168.35.42:drinktionary:8091 - was unable to refresh its cache! This periodic background refresh will be retried in 30 seconds. status = Cannot execute request on any known server stacktrace = com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server +2024-07-01T15:35:17.022+09:00 WARN 5719 --- [drinktionary] [ Test worker] c.n.d.s.t.d.RetryableEurekaHttpClient : Request execution failed with message: I/O error on GET request for "http://sunjoo-server-eureka-eureka-1:8761/eureka/apps/": sunjoo-server-eureka-eureka-1: nodename nor servname provided, or not known +2024-07-01T15:35:17.023+09:00 INFO 5719 --- [drinktionary] [ Test worker] com.netflix.discovery.DiscoveryClient : DiscoveryClient_DRINKTIONARY/192.0.0.2:drinktionary:8091 - was unable to refresh its cache! This periodic background refresh will be retried in 30 seconds. status = Cannot execute request on any known server stacktrace = com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:112) at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getApplications(EurekaHttpClientDecorator.java:134) at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$6.execute(EurekaHttpClientDecorator.java:137) @@ -511,17 +511,17 @@

Standard output

at worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69) at worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74) -2024-06-26T00:35:43.966+09:00 INFO 11058 --- [drinktionary] [ Test worker] com.netflix.discovery.DiscoveryClient : Initial registry fetch from primary servers failed -2024-06-26T00:35:43.966+09:00 WARN 11058 --- [drinktionary] [ Test worker] com.netflix.discovery.DiscoveryClient : Using default backup registry implementation which does not do anything. -2024-06-26T00:35:43.966+09:00 INFO 11058 --- [drinktionary] [ Test worker] com.netflix.discovery.DiscoveryClient : Initial registry fetch from backup servers failed -2024-06-26T00:35:43.967+09:00 INFO 11058 --- [drinktionary] [ Test worker] com.netflix.discovery.DiscoveryClient : Starting heartbeat executor: renew interval is: 30 -2024-06-26T00:35:43.968+09:00 INFO 11058 --- [drinktionary] [ Test worker] c.n.discovery.InstanceInfoReplicator : InstanceInfoReplicator onDemand update allowed rate per min is 4 -2024-06-26T00:35:43.971+09:00 INFO 11058 --- [drinktionary] [ Test worker] com.netflix.discovery.DiscoveryClient : Discovery Client initialized at timestamp 1719329743970 with initial instances count: 0 -2024-06-26T00:35:43.973+09:00 INFO 11058 --- [drinktionary] [ Test worker] o.s.c.n.e.s.EurekaServiceRegistry : Registering application DRINKTIONARY with eureka with status UP -2024-06-26T00:35:43.973+09:00 INFO 11058 --- [drinktionary] [ Test worker] com.netflix.discovery.DiscoveryClient : Saw local status change event StatusChangeEvent [timestamp=1719329743973, current=UP, previous=STARTING] -2024-06-26T00:35:43.974+09:00 INFO 11058 --- [drinktionary] [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_DRINKTIONARY/192.168.35.42:drinktionary:8091: registering service... -2024-06-26T00:35:43.986+09:00 INFO 11058 --- [drinktionary] [ Test worker] c.s.d.DrinktionaryApplicationTests : Started DrinktionaryApplicationTests in 2.62 seconds (process running for 3.241) -2024-06-26T00:35:43.995+09:00 INFO 11058 --- [drinktionary] [nfoReplicator-0] c.n.d.s.t.d.RedirectingEurekaHttpClient : Request execution error. endpoint=DefaultEndpoint{ serviceUrl='http://sunjoo-server-eureka-eureka-1:8761/eureka/}, exception=I/O error on POST request for "http://sunjoo-server-eureka-eureka-1:8761/eureka/apps/DRINKTIONARY": sunjoo-server-eureka-eureka-1 stacktrace=org.springframework.web.client.ResourceAccessException: I/O error on POST request for "http://sunjoo-server-eureka-eureka-1:8761/eureka/apps/DRINKTIONARY": sunjoo-server-eureka-eureka-1 +2024-07-01T15:35:17.028+09:00 INFO 5719 --- [drinktionary] [ Test worker] com.netflix.discovery.DiscoveryClient : Initial registry fetch from primary servers failed +2024-07-01T15:35:17.029+09:00 WARN 5719 --- [drinktionary] [ Test worker] com.netflix.discovery.DiscoveryClient : Using default backup registry implementation which does not do anything. +2024-07-01T15:35:17.029+09:00 INFO 5719 --- [drinktionary] [ Test worker] com.netflix.discovery.DiscoveryClient : Initial registry fetch from backup servers failed +2024-07-01T15:35:17.029+09:00 INFO 5719 --- [drinktionary] [ Test worker] com.netflix.discovery.DiscoveryClient : Starting heartbeat executor: renew interval is: 30 +2024-07-01T15:35:17.031+09:00 INFO 5719 --- [drinktionary] [ Test worker] c.n.discovery.InstanceInfoReplicator : InstanceInfoReplicator onDemand update allowed rate per min is 4 +2024-07-01T15:35:17.033+09:00 INFO 5719 --- [drinktionary] [ Test worker] com.netflix.discovery.DiscoveryClient : Discovery Client initialized at timestamp 1719815717033 with initial instances count: 0 +2024-07-01T15:35:17.035+09:00 INFO 5719 --- [drinktionary] [ Test worker] o.s.c.n.e.s.EurekaServiceRegistry : Registering application DRINKTIONARY with eureka with status UP +2024-07-01T15:35:17.035+09:00 INFO 5719 --- [drinktionary] [ Test worker] com.netflix.discovery.DiscoveryClient : Saw local status change event StatusChangeEvent [timestamp=1719815717035, current=UP, previous=STARTING] +2024-07-01T15:35:17.036+09:00 INFO 5719 --- [drinktionary] [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_DRINKTIONARY/192.0.0.2:drinktionary:8091: registering service... +2024-07-01T15:35:17.046+09:00 INFO 5719 --- [drinktionary] [ Test worker] c.s.d.DrinktionaryApplicationTests : Started DrinktionaryApplicationTests in 2.656 seconds (process running for 3.277) +2024-07-01T15:35:17.057+09:00 INFO 5719 --- [drinktionary] [nfoReplicator-0] c.n.d.s.t.d.RedirectingEurekaHttpClient : Request execution error. endpoint=DefaultEndpoint{ serviceUrl='http://sunjoo-server-eureka-eureka-1:8761/eureka/}, exception=I/O error on POST request for "http://sunjoo-server-eureka-eureka-1:8761/eureka/apps/DRINKTIONARY": sunjoo-server-eureka-eureka-1 stacktrace=org.springframework.web.client.ResourceAccessException: I/O error on POST request for "http://sunjoo-server-eureka-eureka-1:8761/eureka/apps/DRINKTIONARY": sunjoo-server-eureka-eureka-1 at org.springframework.web.client.RestTemplate.createResourceAccessException(RestTemplate.java:915) at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:895) at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:790) @@ -582,8 +582,8 @@

Standard output

at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:889) ... 22 more -2024-06-26T00:35:43.996+09:00 WARN 11058 --- [drinktionary] [nfoReplicator-0] c.n.d.s.t.d.RetryableEurekaHttpClient : Request execution failed with message: I/O error on POST request for "http://sunjoo-server-eureka-eureka-1:8761/eureka/apps/DRINKTIONARY": sunjoo-server-eureka-eureka-1 -2024-06-26T00:35:43.996+09:00 WARN 11058 --- [drinktionary] [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_DRINKTIONARY/192.168.35.42:drinktionary:8091 - registration failed Cannot execute request on any known server +2024-07-01T15:35:17.057+09:00 WARN 5719 --- [drinktionary] [nfoReplicator-0] c.n.d.s.t.d.RetryableEurekaHttpClient : Request execution failed with message: I/O error on POST request for "http://sunjoo-server-eureka-eureka-1:8761/eureka/apps/DRINKTIONARY": sunjoo-server-eureka-eureka-1 +2024-07-01T15:35:17.057+09:00 WARN 5719 --- [drinktionary] [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_DRINKTIONARY/192.0.0.2:drinktionary:8091 - registration failed Cannot execute request on any known server com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:112) ~[eureka-client-2.0.2.jar:2.0.2] @@ -601,7 +601,7 @@

Standard output

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na] at java.base/java.lang.Thread.run(Thread.java:840) ~[na:na] -2024-06-26T00:35:43.998+09:00 WARN 11058 --- [drinktionary] [nfoReplicator-0] c.n.discovery.InstanceInfoReplicator : There was a problem with the instance info replicator +2024-07-01T15:35:17.060+09:00 WARN 5719 --- [drinktionary] [nfoReplicator-0] c.n.discovery.InstanceInfoReplicator : There was a problem with the instance info replicator com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:112) ~[eureka-client-2.0.2.jar:2.0.2] @@ -630,7 +630,7 @@

Standard output

Generated by -Gradle 8.8 at 2024. 6. 26. 오전 12:35:44

+Gradle 8.8 at 2024. 7. 1. 오후 3:35:17

diff --git a/build/reports/tests/test/index.html b/build/reports/tests/test/index.html index 07185d4..49f7576 100644 --- a/build/reports/tests/test/index.html +++ b/build/reports/tests/test/index.html @@ -38,7 +38,7 @@

Test Summary

-
0.304s
+
0.297s

duration

@@ -85,7 +85,7 @@

Packages

1 0 0 -0.304s +0.297s 100% @@ -112,7 +112,7 @@

Classes

1 0 0 -0.304s +0.297s 100% @@ -126,7 +126,7 @@

Classes

Generated by -Gradle 8.8 at 2024. 6. 26. 오전 12:35:44

+Gradle 8.8 at 2024. 7. 1. 오후 3:35:17

diff --git a/build/reports/tests/test/packages/com.sunjoo.drinktionary.html b/build/reports/tests/test/packages/com.sunjoo.drinktionary.html index 09ac989..f4d45f5 100644 --- a/build/reports/tests/test/packages/com.sunjoo.drinktionary.html +++ b/build/reports/tests/test/packages/com.sunjoo.drinktionary.html @@ -40,7 +40,7 @@

Package com.sunjoo.drinktionary

-
0.304s
+
0.297s

duration

@@ -83,7 +83,7 @@

Classes

1 0 0 -0.304s +0.297s 100% @@ -96,7 +96,7 @@

Classes

Generated by -Gradle 8.8 at 2024. 6. 26. 오전 12:35:44

+Gradle 8.8 at 2024. 7. 1. 오후 3:35:17

diff --git a/build/test-results/test/TEST-com.sunjoo.drinktionary.DrinktionaryApplicationTests.xml b/build/test-results/test/TEST-com.sunjoo.drinktionary.DrinktionaryApplicationTests.xml index 87151b9..8fa5e41 100644 --- a/build/test-results/test/TEST-com.sunjoo.drinktionary.DrinktionaryApplicationTests.xml +++ b/build/test-results/test/TEST-com.sunjoo.drinktionary.DrinktionaryApplicationTests.xml @@ -1,9 +1,9 @@ - + - - + createReview(@RequestHeader("Authorization // 주류 리뷰 리스트 조회 @GetMapping("/{drink_id}/reviews") - public ResponseEntity findReviewsById(@RequestHeader("userNo") String userNo, @PathVariable(value = "drink_id") Long drinkId) { + public ResponseEntity findReviewsById(@RequestHeader("Authorization") String token, @PathVariable(value = "drink_id") Long drinkId) { final ReviewResponses reviews = reviewService.getReviews(drinkId); return ResponseEntity.ok(reviews); } + // 감정에 따른 주류 반환 +// @GetMapping("/recommend") +// public ResponseEntity recommendSentiment(@RequestHeader("Authorization") String token, @RequestParam String sentiment) { +// Sentiment sentimentEnum; +// sentimentEnum = Sentiment.valueOf(sentiment.toUpperCase()); +// +// Drink drink = drinkService.getRecommendDrink(sentimentEnum); +// +// final DrinkResponse drinkResponse = drinkService. +// return ResponseEntity.ok(drinkResponse); +// } +// } diff --git a/src/main/java/com/sunjoo/drinktionary/service/DrinkService.java b/src/main/java/com/sunjoo/drinktionary/service/DrinkService.java index d08f8d4..2bbd388 100644 --- a/src/main/java/com/sunjoo/drinktionary/service/DrinkService.java +++ b/src/main/java/com/sunjoo/drinktionary/service/DrinkService.java @@ -4,12 +4,14 @@ import com.sunjoo.drinktionary.dto.ReviewResponse; import com.sunjoo.drinktionary.dto.WriteReviewRequest; import com.sunjoo.drinktionary.entity.DrinkType; +import com.sunjoo.drinktionary.entity.Sentiment; import com.sunjoo.drinktionary.repository.DrinkRepository; import com.sunjoo.drinktionary.dto.DrinkResponse; import com.sunjoo.drinktionary.entity.Drink; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.util.Collections; import java.util.List; import java.util.stream.Collectors; @@ -111,4 +113,10 @@ public ReviewResponse postReview(final Long drinkId, final WriteReviewRequest re return reviewService.postReview(drink, request, token); } + public Drink getRecommendDrink(final Sentiment sentiment) { + final List drinks = drinkRepository.findBySentiment(sentiment); + Collections.shuffle(drinks); + + return drinks.get(0); + } } diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 62fcf7a..37000ae 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -10,7 +10,7 @@ spring: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://sunjoo-drinktionary.clau8wyu484y.ap-northeast-2.rds.amazonaws.com:3306/sunjoo?useSSL=false&useUnicode=true&serverTimezone=Asia/Seoul&allowPublicKeyRetrieval=true&createDatabaseIfNotExist=true username: root - password: drinktionary0606 + password: sunjoo-drinktionary0628 jpa: hibernate: ddl-auto: validate