spi*_*lba 9 java spring spring-boot
这是我的第一个 spring-boot 应用程序。我运行了一个示例代码,它卡在“Initialized JPA EntityManagerFactory for persistence unit \'default\'”处。
\n\n下面是代码
\n\npackage com.fredo.webservices.homefredoServcies;\n\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\n\n@SpringBootApplication\npublic class HomeFredoServciesApplication {\n\n public static void main(String[] args) {\n SpringApplication.run(HomeFredoServciesApplication.class, args);\n }\n\n}\nRun Code Online (Sandbox Code Playgroud)\n\n下面是日志
\n\n . ____ _ __ _ _\n /\\\\ / ___\'_ __ _ _(_)_ __ __ _ \\ \\ \\ \\\n( ( )\\___ | \'_ | \'_| | \'_ \\/ _` | \\ \\ \\ \\\n \\\\/ ___)| |_)| | | | | || (_| | ) ) ) )\n \' |____| .__|_| |_|_| |_\\__, | / / / /\n =========|_|==============|___/=/_/_/_/\n :: Spring Boot :: (v2.3.0.RELEASE)\n\n2020-06-07 20:58:15.807 INFO 1496 --- [ restartedMain] c.f.w.h.HomeFredoServciesApplication : Starting HomeFredoServciesApplication on ANGU with PID 1496 (C:\\Users\\ASUS\\Desktop\\java ms\\home-fredoServcies\\target\\classes started by Angu in C:\\Users\\ASUS\\Desktop\\java ms\\home-fredoServcies)\n2020-06-07 20:58:15.811 INFO 1496 --- [ restartedMain] c.f.w.h.HomeFredoServciesApplication : No active profile set, falling back to default profiles: default\n2020-06-07 20:58:15.881 INFO 1496 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set \'spring.devtools.add-properties\' to \'false\' to disable\n2020-06-07 20:58:15.882 INFO 1496 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the \'logging.level.web\' property to \'DEBUG\'\n2020-06-07 20:58:16.799 INFO 1496 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFERRED mode.\n2020-06-07 20:58:16.822 INFO 1496 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 13ms. Found 0 JPA repository interfaces.\n2020-06-07 20:58:17.861 INFO 1496 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)\n2020-06-07 20:58:17.876 INFO 1496 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]\n2020-06-07 20:58:17.877 INFO 1496 --- [ restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.35]\n2020-06-07 20:58:18.038 INFO 1496 --- [ restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext\n2020-06-07 20:58:18.038 INFO 1496 --- [ restartedMain] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 2156 ms\n2020-06-07 20:58:18.100 INFO 1496 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...\n2020-06-07 20:58:18.335 INFO 1496 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.\n2020-06-07 20:58:18.342 INFO 1496 --- [ restartedMain] o.s.b.a.h2.H2ConsoleAutoConfiguration : H2 console available at \'/h2-console\'. Database available at \'jdbc:h2:mem:b2c0eff5-9805-4a71-9f66-c6c863d910f5\'\n2020-06-07 20:58:18.548 INFO 1496 --- [ restartedMain] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService \'applicationTaskExecutor\'\n2020-06-07 20:58:18.629 INFO 1496 --- [ task-1] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]\n2020-06-07 20:58:18.674 WARN 1496 --- [ 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\n2020-06-07 20:58:18.720 INFO 1496 --- [ task-1] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.4.15.Final\n2020-06-07 20:58:18.966 INFO 1496 --- [ task-1] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.0.Final}\n2020-06-07 20:58:19.203 INFO 1496 --- [ task-1] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect\n2020-06-07 20:58:19.210 INFO 1496 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729\n2020-06-07 20:58:19.317 INFO 1496 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path \'\'\n2020-06-07 20:58:19.322 INFO 1496 --- [ restartedMain] DeferredRepositoryInitializationListener : Triggering deferred initialization of Spring Data repositories\xe2\x80\xa6\n2020-06-07 20:58:19.324 INFO 1496 --- [ restartedMain] DeferredRepositoryInitializationListener : Spring Data repositories initialized!\n2020-06-07 20:58:19.344 INFO 1496 --- [ restartedMain] c.f.w.h.HomeFredoServciesApplication : Started HomeFredoServciesApplication in 3.985 seconds (JVM running for 4.795)\n2020-06-07 20:58:19.554 INFO 1496 --- [ task-1] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]\n2020-06-07 20:58:19.562 INFO 1496 --- [ task-1] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit \'default\'\nRun Code Online (Sandbox Code Playgroud)\n
jpe*_*ep1 16
我在调试模式下通过 Eclipse 和 Spring Tool Run Configuration 启动的应用程序遇到了同样的问题。
断点引用了某些已删除的块代码上的一行,删除错误的断点后,应用程序再次正确启动。
窗口->显示视图->断点
小智 0
如果收到响应,请尝试点击http://localhost:8080/h2-console 。您的服务器已启动并正在运行。日志中显示 H2 控制台位于“/h2-console”。数据库位于“jdbc:h2:mem:b2c0eff5-9805-4a71-9f66-c6c863d910f5”
| 归档时间: |
|
| 查看次数: |
10447 次 |
| 最近记录: |