• 카테고리

    질문 & 답변
  • 세부 분야

    백엔드

  • 해결 여부

    미해결

스프링이 자동으로 재실행됩니다.

22.01.07 00:14 작성 조회수 487

0

실행은 정상적으로 되는데. 계속 자동으로 재시작이 됩니다..

 초반부에서도 재시작되는 경우가 있긴했는데. 가끔가다 간혈적으로 한번 그러길래 넘겼는데.

진행하다보니깐 재시작을 너무 많이해서. 어려움이 있어서. 질문드립니다. 쓰레드 관련 문제인가 싶기도한데. 그쪽 부분은 @Asnyc 사용하려고 @EnableAsnyc밖에 없는데. 혹시 무슨 문제인지 알수있을까요?

 

  .   ____          _            __ _ _

 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \

( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \

 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )

  '  |____| .__|_| |_|_| |_\__, | / / / /

 =========|_|==============|___/=/_/_/_/

 :: Spring Boot ::                (v2.6.2)

 

2022-01-07 00:01:30.090  INFO 18482 --- [  restartedMain] c.p.o.OttShareServiceApplication         : Starting OttShareServiceApplication using Java 16.0.2 on ijaegeon-ui-MacBookAir.local with PID 18482 (/Users/jaegeon/Desktop/projects/ott-share-service/build/classes/java/main started by jaegeon in /Users/jaegeon/Desktop/projects/ott-share-service)

2022-01-07 00:01:30.091  INFO 18482 --- [  restartedMain] c.p.o.OttShareServiceApplication         : No active profile set, falling back to default profiles: default

2022-01-07 00:01:30.528  INFO 18482 --- [  restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.

2022-01-07 00:01:30.573  INFO 18482 --- [  restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 32 ms. Found 2 JPA repository interfaces.

2022-01-07 00:01:30.713  INFO 18482 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)

2022-01-07 00:01:30.716  INFO 18482 --- [  restartedMain] o.apache.catalina.core.StandardService   : Starting service [Tomcat]

2022-01-07 00:01:30.716  INFO 18482 --- [  restartedMain] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.56]

2022-01-07 00:01:30.727  INFO 18482 --- [  restartedMain] o.a.c.c.C.[Tomcat-5].[localhost].[/]     : Initializing Spring embedded WebApplicationContext

2022-01-07 00:01:30.728  INFO 18482 --- [  restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 636 ms

2022-01-07 00:01:30.745  INFO 18482 --- [  restartedMain] com.zaxxer.hikari.HikariDataSource       : HikariPool-7 - Starting...

2022-01-07 00:01:30.759  INFO 18482 --- [  restartedMain] com.zaxxer.hikari.HikariDataSource       : HikariPool-7 - Start completed.

2022-01-07 00:01:30.759  INFO 18482 --- [  restartedMain] o.s.b.a.h2.H2ConsoleAutoConfiguration    : H2 console available at '/h2-console'. Database available at 'jdbc:h2:mem:799ee181-6d24-4b70-be20-790fa206adfc'

2022-01-07 00:01:30.789  INFO 18482 --- [  restartedMain] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [name: default]

2022-01-07 00:01:30.794  INFO 18482 --- [  restartedMain] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect

2022-01-07 00:01:30.918  INFO 18482 --- [  restartedMain] o.h.e.t.j.p.i.JtaPlatformInitiator       : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]

2022-01-07 00:01:30.918  INFO 18482 --- [  restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'

2022-01-07 00:01:30.934  WARN 18482 --- [  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-01-07 00:01:30.941  WARN 18482 --- [  restartedMain] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mailSenderImpl' defined in file [/Users/jaegeon/Desktop/projects/ott-share-service/build/classes/java/main/com/project/ottshareservice/mail/MailSenderImpl.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.mail.javamail.JavaMailSender' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}

2022-01-07 00:01:30.941  INFO 18482 --- [  restartedMain] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'

2022-01-07 00:01:30.941  INFO 18482 --- [  restartedMain] .SchemaDropperImpl$DelayedDropActionImpl : HHH000477: Starting delayed evictData of schema as part of SessionFactory shut-down'

2022-01-07 00:01:31.154  WARN 18482 --- [  restartedMain] o.s.b.f.support.DisposableBeanAdapter    : Invocation of destroy method failed on bean with name 'inMemoryDatabaseShutdownExecutor': org.h2.jdbc.JdbcSQLNonTransientConnectionException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-200]

2022-01-07 00:01:31.155  INFO 18482 --- [  restartedMain] com.zaxxer.hikari.HikariDataSource       : HikariPool-7 - Shutdown initiated...

2022-01-07 00:01:31.156  INFO 18482 --- [  restartedMain] com.zaxxer.hikari.HikariDataSource       : HikariPool-7 - Shutdown completed.

2022-01-07 00:01:31.157  INFO 18482 --- [  restartedMain] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]

2022-01-07 00:01:31.172  INFO 18482 --- [  restartedMain] ConditionEvaluationReportLoggingListener : 

 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.

2022-01-07 00:01:31.187 ERROR 18482 --- [  restartedMain] o.s.b.d.LoggingFailureAnalysisReporter   : 

 

***************************

APPLICATION FAILED TO START

***************************

 

Description:

 

Parameter 0 of constructor in com.project.ottshareservice.mail.MailSenderImpl required a bean of type 'org.springframework.mail.javamail.JavaMailSender' that could not be found.

 

 

Action:

 

Consider defining a bean of type 'org.springframework.mail.javamail.JavaMailSender' in your configuration.

 

 

  .   ____          _            __ _ _

 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \

( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \

 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )

  '  |____| .__|_| |_|_| |_\__, | / / / /

 =========|_|==============|___/=/_/_/_/

 :: Spring Boot ::                (v2.6.2)

 

이런식으로 반복됩니다. 

답변 1

답변을 작성해보세요.

2

아.. ㅋㅋㅋ 계속 자동으로 실행된다면 아무래도 pom.xml에서 springboot-devtools 의존성이 들어있을텐데 그걸 제거해 주세요.