인프런 커뮤니티 질문&답변

임도현님의 프로필 이미지
임도현

작성한 질문수

스프링과 JPA 기반 웹 애플리케이션 개발

프로필 수정 폼

Ctrl+f9 빌드에 관해서 질문입니다.

작성

·

367

0

안녕하세요 선생님

선생님은 settings/profile에서 새로고침을 누르셔도 login 페이지로 안넘어 가시던데 제가 인메모리 h2 db를 써서 그런건가요?

아래는 build 누른 시점부터 찍히는 로그입니다. h2를 껐다 켜서 로그인정보가 다 날아간것 같습니다.

아니면 제가 뭔가 다른 실수를 한게 있을까요?

 

2022-07-23 12:44:18.358  INFO 11819 --- [       Thread-7] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2022-07-23 12:44:18.359  INFO 11819 --- [       Thread-7] .SchemaDropperImpl$DelayedDropActionImpl : HHH000477: Starting delayed evictData of schema as part of SessionFactory shut-down'
2022-07-23 12:44:18.561  WARN 11819 --- [       Thread-7] 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-214]
2022-07-23 12:44:18.563  INFO 11819 --- [       Thread-7] com.zaxxer.hikari.HikariDataSource       : HikariPool-2 - Shutdown initiated...
2022-07-23 12:44:18.577  INFO 11819 --- [       Thread-7] com.zaxxer.hikari.HikariDataSource       : HikariPool-2 - Shutdown completed.

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v2.7.1)

2022-07-23 12:44:18.621  INFO 11819 --- [  restartedMain] com.StudyCafe_R.StudyCafe_R.App          : Starting App using Java 11.0.14 on tony-dev-pc with PID 11819 (/home/tony/vscode/StudyCafe_R/build/classes/java/main started by tony in /home/tony/vscode/StudyCafe_R)
2022-07-23 12:44:18.621  INFO 11819 --- [  restartedMain] com.StudyCafe_R.StudyCafe_R.App          : The following 1 profile is active: "local"
2022-07-23 12:44:18.708  INFO 11819 --- [  restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2022-07-23 12:44:18.712  INFO 11819 --- [  restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 3 ms. Found 1 JPA repository interfaces.
2022-07-23 12:44:18.756  INFO 11819 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2022-07-23 12:44:18.757  INFO 11819 --- [  restartedMain] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2022-07-23 12:44:18.757  INFO 11819 --- [  restartedMain] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.64]
2022-07-23 12:44:18.762  INFO 11819 --- [  restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2022-07-23 12:44:18.762  INFO 11819 --- [  restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 140 ms
2022-07-23 12:44:18.767  INFO 11819 --- [  restartedMain] com.zaxxer.hikari.HikariDataSource       : HikariPool-3 - Starting...
2022-07-23 12:44:18.769  INFO 11819 --- [  restartedMain] com.zaxxer.hikari.HikariDataSource       : HikariPool-3 - Start completed.
2022-07-23 12:44:18.769  INFO 11819 --- [  restartedMain] o.s.b.a.h2.H2ConsoleAutoConfiguration    : H2 console available at '/h2-console'. Database available at 'jdbc:h2:mem:57d02fcf-bc77-4b9d-a458-af74c8af958b'
2022-07-23 12:44:18.779  WARN 11819 --- [  restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/]       : Cannot deserialize session attribute [SPRING_SECURITY_CONTEXT] for session [9D571E53AB4D3E439BDA725FFD381C3E]
2022-07-23 12:44:18.786  INFO 11819 --- [  restartedMain] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [name: default]
2022-07-23 12:44:18.789  INFO 11819 --- [  restartedMain] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
2022-07-23 12:44:18.821  INFO 11819 --- [  restartedMain] o.h.e.t.j.p.i.JtaPlatformInitiator       : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2022-07-23 12:44:18.821  INFO 11819 --- [  restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2022-07-23 12:44:18.868  WARN 11819 --- [  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-07-23 12:44:18.873  INFO 11819 --- [  restartedMain] o.s.b.a.w.s.WelcomePageHandlerMapping    : Adding welcome page template: index
2022-07-23 12:44:18.896  INFO 11819 --- [  restartedMain] o.s.s.web.DefaultSecurityFilterChain     : Will secure any request with [org.springframework.security.web.session.DisableEncodeUrlFilter@1297ed15, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@50c40432, org.springframework.security.web.context.SecurityContextPersistenceFilter@8027741, org.springframework.security.web.header.HeaderWriterFilter@74f31289, org.springframework.security.web.csrf.CsrfFilter@133775ab, org.springframework.security.web.authentication.logout.LogoutFilter@4eca5019, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter@1ee33650, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@1fd2f745, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@73d9d96c, org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter@645db284, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@5712f9cc, org.springframework.security.web.session.SessionManagementFilter@20b0d4d1, org.springframework.security.web.access.ExceptionTranslationFilter@39f5c652, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@4a81020f]
2022-07-23 12:44:18.897  WARN 11819 --- [  restartedMain] o.s.s.c.a.web.builders.WebSecurity       : You are asking Spring Security to ignore Mvc [pattern='/node_modules/**']. This is not recommended -- please use permitAll via HttpSecurity#authorizeHttpRequests instead.
2022-07-23 12:44:18.897  INFO 11819 --- [  restartedMain] o.s.s.web.DefaultSecurityFilterChain     : Will not secure Mvc [pattern='/node_modules/**']
2022-07-23 12:44:18.897  WARN 11819 --- [  restartedMain] o.s.s.c.a.web.builders.WebSecurity       : You are asking Spring Security to ignore org.springframework.boot.autoconfigure.security.servlet.StaticResourceRequest$StaticResourceRequestMatcher@53e17a1c. This is not recommended -- please use permitAll via HttpSecurity#authorizeHttpRequests instead.
2022-07-23 12:44:18.897  INFO 11819 --- [  restartedMain] o.s.s.web.DefaultSecurityFilterChain     : Will not secure org.springframework.boot.autoconfigure.security.servlet.StaticResourceRequest$StaticResourceRequestMatcher@53e17a1c
2022-07-23 12:44:18.925  INFO 11819 --- [  restartedMain] o.s.b.d.a.OptionalLiveReloadServer       : LiveReload server is running on port 35729
2022-07-23 12:44:18.932  INFO 11819 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
2022-07-23 12:44:18.935  INFO 11819 --- [  restartedMain] com.StudyCafe_R.StudyCafe_R.App          : Started App in 0.326 seconds (JVM running for 94.183)
2022-07-23 12:44:18.936  INFO 11819 --- [  restartedMain] .ConditionEvaluationDeltaLoggingListener : Condition evaluation unchanged
2022-07-23 12:44:32.035  INFO 11819 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring DispatcherServlet 'dispatcherServlet'
2022-07-23 12:44:32.036  INFO 11819 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'
2022-07-23 12:44:32.037  INFO 11819 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet        : Completed initialization in 1 ms

 

 

 

 

답변 1

1

임도현님의 프로필 이미지
임도현
질문자

setting -> build 에서

build and run using

Run tests using

 

둘다 gradle에서 intellij 로 바꾸니 build할시 선생님과 동일하게 동작하였습니다.

임도현님의 프로필 이미지
임도현

작성한 질문수

질문하기