前提・実現したいこと
Java初心者です、初めて質問させていただきます
webアプリケーションを作成したいと思い
https://medium-company.com/spring-boot-thymeleaf/
こちらのサイトを参考に"HelloWorld"を表示させようとしたところ
このサイトにアクセスできませんlocalhost で接続が拒否されました。
次をお試しください
接続を確認する
プロキシとファイアウォールを確認する
ERR_CONNECTION_REFUSED
上記の通りlocalhostにアクセスできません
またプロジェクトの実行を行った際コンソールの上部に
<終了>springSample-1 -SpringSample1Application[Spring Boot アプリケーション]
と表示されます。
発生している問題・エラーメッセージ
. ____ _ __ _ _
/\ / ' __ _ () __ __ _ \ \ \
( ( )__ | '_ | '| | ' / ` | \ \ \
/ __)| |)| | | | | || (| | ) ) ) )
' || .__|| ||| |_, | / / / /
=========||==============|/=////
[32m :: Spring Boot :: [39m [2m (v2.5.3)[0;39m
[2m2021-08-19 16:05:32.209[0;39m [32m INFO[0;39m [35m4616[0;39m [2m---[0;39m [2m[ main][0;39m [36mc.example.demo.SpringSample1Application [0;39m [2m:[0;39m Starting SpringSample1Application using Java 11.0.11 on SICPC-2021-01 with PID 4616 (C:\Users\SIC\Desktop\アプリケーション作成課題Java\springSample-1\bin\main started by SIC in C:\Users\SIC\Desktop\アプリケーション作成課題Java\springSample-1)
[2m2021-08-19 16:05:32.211[0;39m [32m INFO[0;39m [35m4616[0;39m [2m---[0;39m [2m[ main][0;39m [36mc.example.demo.SpringSample1Application [0;39m [2m:[0;39m No active profile set, falling back to default profiles: default
[2m2021-08-19 16:05:32.615[0;39m [32m INFO[0;39m [35m4616[0;39m [2m---[0;39m [2m[ main][0;39m [36m.s.d.r.c.RepositoryConfigurationDelegate[0;39m [2m:[0;39m Bootstrapping Spring Data JPA repositories in DEFAULT mode.
[2m2021-08-19 16:05:32.626[0;39m [32m INFO[0;39m [35m4616[0;39m [2m---[0;39m [2m[ main][0;39m [36m.s.d.r.c.RepositoryConfigurationDelegate[0;39m [2m:[0;39m Finished Spring Data repository scanning in 5 ms. Found 0 JPA repository interfaces.
[2m2021-08-19 16:05:32.955[0;39m [32m INFO[0;39m [35m4616[0;39m [2m---[0;39m [2m[ main][0;39m [36mo.s.b.w.embedded.tomcat.TomcatWebServer [0;39m [2m:[0;39m Tomcat initialized with port(s): 8080 (http)
[2m2021-08-19 16:05:32.962[0;39m [32m INFO[0;39m [35m4616[0;39m [2m---[0;39m [2m[ main][0;39m [36mo.apache.catalina.core.StandardService [0;39m [2m:[0;39m Starting service [Tomcat]
[2m2021-08-19 16:05:32.962[0;39m [32m INFO[0;39m [35m4616[0;39m [2m---[0;39m [2m[ main][0;39m [36morg.apache.catalina.core.StandardEngine [0;39m [2m:[0;39m Starting Servlet engine: [Apache Tomcat/9.0.50]
[2m2021-08-19 16:05:33.043[0;39m [32m INFO[0;39m [35m4616[0;39m [2m---[0;39m [2m[ main][0;39m [36mo.a.c.c.C.[Tomcat].[localhost].[/] [0;39m [2m:[0;39m Initializing Spring embedded WebApplicationContext
[2m2021-08-19 16:05:33.044[0;39m [32m INFO[0;39m [35m4616[0;39m [2m---[0;39m [2m[ main][0;39m [36mw.s.c.ServletWebServerApplicationContext[0;39m [2m:[0;39m Root WebApplicationContext: initialization completed in 801 ms
[2m2021-08-19 16:05:33.081[0;39m [33m WARN[0;39m [35m4616[0;39m [2m---[0;39m [2m[ main][0;39m [36mConfigServletWebServerApplicationContext[0;39m [2m:[0;39m Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dataSourceScriptDatabaseInitializer' defined in class path resource [org/springframework/boot/autoconfigure/sql/init/DataSourceInitializationConfiguration.class]: Unsatisfied dependency expressed through method 'dataSourceScriptDatabaseInitializer' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class
[2m2021-08-19 16:05:33.082[0;39m [32m INFO[0;39m [35m4616[0;39m [2m---[0;39m [2m[ main][0;39m [36mo.apache.catalina.core.StandardService [0;39m [2m:[0;39m Stopping service [Tomcat]
[2m2021-08-19 16:05:33.095[0;39m [32m INFO[0;39m [35m4616[0;39m [2m---[0;39m [2m[ main][0;39m [36mConditionEvaluationReportLoggingListener[0;39m [2m:[0;39m
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
[2m2021-08-19 16:05:33.105[0;39m [31mERROR[0;39m [35m4616[0;39m [2m---[0;39m [2m[ main][0;39m [36mo.s.b.d.LoggingFailureAnalysisReporter [0;39m [2m:[0;39m
APPLICATION FAILED TO START
Description:
Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
Reason: Failed to determine a suitable driver class
Action:
Consider the following:
If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).
補足情報(FW/ツールのバージョンなど)
言葉足らずですいません。
よろしくお願いい達します。
回答1件
あなたの回答
tips
プレビュー