龙空技术网

根据启动日志聊聊 Spring boot 项目启动时的初始化

半糖ypk 664

前言:

现时咱们对“vs初始化”大体比较关注,同学们都想要知道一些“vs初始化”的相关资讯。那么小编也在网上网罗了一些有关“vs初始化””的相关文章,希望各位老铁们能喜欢,你们一起来了解一下吧!

简述

本文讲述内容是基于spring boot+JPA+Oracle为主要技术架构的基础项目,我们都知道项目启动时都会做一些基础初始化,并且会自动输出一些日志,今天就来看看这些初始日志都是做了什么。

启动日志

2021-07-23 10:53:46.549 [SpringApplicationShutdownHook] INFO  [] o.s.orm.jpa.LocalContainerEntityManagerFactoryBean 651|Closing JPA EntityManagerFactory for persistence unit 'default'2021-07-23 10:53:46.557 [SpringApplicationShutdownHook] INFO  [] com.zaxxer.hikari.HikariDataSource 350|HikariPool-1 - Shutdown initiated...2021-07-23 10:53:46.595 [SpringApplicationShutdownHook] INFO  [] com.zaxxer.hikari.HikariDataSource 352|HikariPool-1 - Shutdown completed.2021-07-23 10:53:49.748 [main] INFO  [] c.c.g.i.h.HundsunInterfaceApplication 55|Starting HundsunInterfaceApplication v0.0.1-SNAPSHOT using Java 1.8.0_292 on 39194fdf4278 with PID 1 (/usr/local/hundsun-interface/hundsun-interface.jar started by root in /usr/local/hundsun-interface)2021-07-23 10:53:49.750 [main] DEBUG [] c.c.g.i.h.HundsunInterfaceApplication 56|Running with Spring Boot v2.5.2, Spring v5.3.82021-07-23 10:53:49.751 [main] INFO  [] c.c.g.i.h.HundsunInterfaceApplication 663|The following profiles are active: test2021-07-23 10:53:50.580 [main] INFO  [] o.s.d.r.config.RepositoryConfigurationDelegate 132|Bootstrapping Spring Data JPA repositories in DEFAULT mode.2021-07-23 10:53:50.705 [main] INFO  [] o.s.d.r.config.RepositoryConfigurationDelegate 201|Finished Spring Data repository scanning in 114 ms. Found 11 JPA repository interfaces.2021-07-23 10:53:51.801 [main] INFO  [] o.s.boot.web.embedded.tomcat.TomcatWebServer 108|Tomcat initialized with port(s): 8080 (http)2021-07-23 10:53:51.811 [main] INFO  [] org.apache.coyote.http11.Http11NioProtocol 173|Initializing ProtocolHandler ["http-nio-8080"]2021-07-23 10:53:51.812 [main] INFO  [] org.apache.catalina.core.StandardService 173|Starting service [Tomcat]2021-07-23 10:53:51.812 [main] INFO  [] org.apache.catalina.core.StandardEngine 173|Starting Servlet engine: [Apache Tomcat/9.0.48]2021-07-23 10:53:51.869 [main] INFO  [] o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] 173|Initializing Spring embedded WebApplicationContext2021-07-23 10:53:51.870 [main] INFO  [] o.s.b.w.s.c.ServletWebServerApplicationContext 290|Root WebApplicationContext: initialization completed in 1981 ms2021-07-23 10:53:52.188 [main] INFO  [] org.hibernate.jpa.internal.util.LogHelper 31|HHH000204: Processing PersistenceUnitInfo [name: default]2021-07-23 10:53:52.254 [main] INFO  [] org.hibernate.Version 44|HHH000412: Hibernate ORM core version 5.4.32.Final2021-07-23 10:53:52.393 [main] INFO  [] org.hibernate.annotations.common.Version 56|HCANN000001: Hibernate Commons Annotations {5.1.2.Final}2021-07-23 10:53:52.527 [main] INFO  [] com.zaxxer.hikari.HikariDataSource 110|HikariPool-1 - Starting...2021-07-23 10:53:52.790 [main] INFO  [] com.zaxxer.hikari.HikariDataSource 123|HikariPool-1 - Start completed.2021-07-23 10:53:52.816 [main] INFO  [] org.hibernate.dialect.Dialect 175|HHH000400: Using dialect: org.hibernate.dialect.Oracle10gDialect2021-07-23 10:54:00.407 [main] INFO  [] o.h.e.t.jta.platform.internal.JtaPlatformInitiator 52|HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]2021-07-23 10:54:00.417 [main] INFO  [] o.s.orm.jpa.LocalContainerEntityManagerFactoryBean 437|Initialized JPA EntityManagerFactory for persistence unit 'default'2021-07-23 10:54:01.629 [main] WARN  [] o.s.b.a.o.j.JpaBaseConfiguration$JpaWebConfiguration 219|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 warning2021-07-23 10:54:02.243 [main] INFO  [] org.apache.coyote.http11.Http11NioProtocol 173|Starting ProtocolHandler ["http-nio-8080"]2021-07-23 10:54:02.276 [main] INFO  [] o.s.boot.web.embedded.tomcat.TomcatWebServer 220|Tomcat started on port(s): 8080 (http) with context path ''2021-07-23 10:54:02.287 [main] INFO  [] c.c.g.i.h.HundsunInterfaceApplication 61|Started HundsunInterfaceApplication in 13.238 seconds (JVM running for 14.337)

日志解释

这是最基本的项目打印的日志,如果还配置了过滤器、定时任务、第三方框架等,也会一一打印出来。

若您觉得文章还不错,记得点赞转发哦!!

标签: #vs初始化