正在回答 回答被采纳积分+1
依赖是黑的
还有src/test/java报错
现在控制台报错
Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2020-04-07 16:55:22.354 ERROR 38760 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Cannot determine embedded database driver class for database type NONE
Action:
If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (no profiles are currently active).
控制台输入:
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.2.6.RELEASE)
2020-04-07 15:27:15.920 INFO 62784 --- [ main] com.imooc.o2o.O2oApplication : Starting O2oApplication on SC-201703152226 with PID 62784 (E:\o2o1\target\classes started by Administrator in E:\o2o1)
2020-04-07 15:27:15.988 INFO 62784 --- [ main] com.imooc.o2o.O2oApplication : No active profile set, falling back to default profiles: default
2020-04-07 15:27:18.826 WARN 62784 --- [ main] o.m.s.mapper.ClassPathMapperScanner : No MyBatis mapper was found in '[com.imooc.o2o]' package. Please check your configuration.
2020-04-07 15:27:20.711 INFO 62784 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2020-04-07 15:27:20.812 INFO 62784 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2020-04-07 15:27:20.813 INFO 62784 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.33]
2020-04-07 15:27:21.023 INFO 62784 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2020-04-07 15:27:21.023 INFO 62784 --- [ main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 4448 ms
2020-04-07 15:27:21.556 INFO 62784 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2020-04-07 15:27:21.913 WARN 62784 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: 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
2020-04-07 15:27:21.913 INFO 62784 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor'
2020-04-07 15:27:21.919 INFO 62784 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2020-04-07 15:27:21.961 INFO 62784 --- [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-04-07 15:27:21.965 ERROR 62784 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
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).
打开不了localhost:8080/hello
Failure to transfer org.junit.jupiter:junit-jupiter-engine:jar:5.5.2 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.junit.jupiter:junit-jupiter-engine:jar:5.5.2 from/to central (https://repo.maven.apache.org/maven2): GET request of: org/junit/jupiter/junit-jupiter-engine/5.5.2/junit-jupiter-engine-5.5.2.jar from central failed
org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer org.junit.jupiter:junit-jupiter-engine:jar:5.5.2 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.junit.jupiter:junit-jupiter-engine:jar:5.5.2 from/to central (https://repo.maven.apache.org/maven2): GET request of: org/junit/jupiter/junit-jupiter-engine/5.5.2/junit-jupiter-engine-5.5.2.jar from central failed
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:226)
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:192)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:564)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:482)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:400)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:225)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:335)
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:202)
at org.apache.maven.project.DefaultProjectBuilder.resolveDependencies(DefaultProjectBuilder.java:225)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:198)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:122)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.readMavenProject(MavenImpl.java:630)
at org.eclipse.m2e.core.internal.project.registry.DefaultMavenDependencyResolver.resolveProjectDependencies(DefaultMavenDependencyResolver.java:63)
at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refreshPhase2(ProjectRegistryManager.java:551)
at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.lambda$2(ProjectRegistryManager.java:515)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:513)
at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:365)
at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:312)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration0(ProjectConfigurationManager.java:405)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$2.call(ProjectConfigurationManager.java:352)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$2.call(ProjectConfigurationManager.java:1)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1370)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:349)
at org.eclipse.m2e.core.ui.internal.UpdateMavenProjectJob.runInWorkspace
还有这个报错
同学你好!
你这个jar还是没有下载下来,可能是由于maven本地仓库的缓存导致始终无法下载,建议你:
将这里设置的maven镜像删除,删除后会默认使用maven配置的setting文件中的maven镜像
Eclipse→Window→Preferences,查看自己本地仓库的地址,如图:
.打开maven仓库目录,进入org\apache\maven目录,形如:
D:\CatMessage\maven\repository\org\apache\maven(注意这里应该是你自己的地址)
然后搜索关键字:“lastUpdated”,
将搜索到的“xxx.lastUpdated”文件全都删掉
选中maven项目,右键--》maven--》update让maven重新下载依赖包,注意要保持网络畅通
祝学习愉快~
pom文件下载报错这个
而且我这个src上面没有这个
- 参与学习 人
- 提交作业 323 份
- 解答问题 8263 个
本阶段将带你学习主流框架SSM,以及SpringBoot ,打通成为Java工程师的最后一公里!
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星