⼆、SpringBoot中maven中dependencies所有的jar包都报
红,ins。。。
问题⼀:现象:打开SpringBoot项⽬后,所有依赖包都报红⾊波浪线
2.尝试解决,删除l所有dependencies,再撤销,再导⼊,均不可以解决,2删除maven的repository,重新导⼊包,也不可以解决;不⽤⽩费⼒⽓了
3.重新导⼊仍显⽰红⾊波浪线
解决⽅法:
都出现maven⽆法下载相关资源的问题,可以使⽤阿⾥云镜像:
在\apache-maven-3.6.0\l中的mirrors修改
保存后,点击install即可下载依赖包
如果maven包正确的话,此时应该就已经解决了,
java version "1.8.0_181"
Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-25T02:41:47+08:00)
问题⼆:由于我⼀开始⽤了Maven 3.6.2,导致另⼀个错误:Unable to create injector, see the following errors:
maven-reimport时提⽰不能导⼊任何包,让查看⽇志,⽇志如下
errors
java.lang.RuntimeException: le.inject.CreationException: Unable to create injector, see the following errors:
1) No implementation for org.del.path.PathTranslator was bound.
while locating org.del.path.PathTranslator
for field at org.del.interpolation.AbstractStringBasedModelInterpolator.pathTranslator(Unknown Source)
dehaus.plexus.figure(DefaultPlexusContainer.java:350)
2) No implementation for org.del.path.UrlNormalizer was bound.
while locating org.del.path.UrlNormalizer
for field at org.del.interpolation.AbstractStringBasedModelInterpolator.urlNormalizer(Unknown Source)
dehaus.plexus.figure(DefaultPlexusContainer.java:350)
errors
le.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:543)
le.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:159)
le.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:106)
le.ateInjector(Guice.java:87)
le.ateInjector(Guice.java:69)
le.ateInjector(Guice.java:59)
dehaus.plexus.DefaultPlexusContainer.addComponent(DefaultPlexusContainer.java:344)
dehaus.plexus.DefaultPlexusContainer.addComponent(DefaultPlexusContainer.java:332)
at org.jetbrains.idea.maven.server.Maven3ServerEmbedderImpl.customizeComponents(Maven3ServerEmbedderImpl.java:556)
at org.jetbrains.idea.maven.server.Maven3ServerEmbedderImpl.customize(Maven3ServerEmbedderImpl.java:526)
flect.NativeMethodAccessorImpl.invoke0(Native Method)
flect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
flect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at flect.Method.invoke(Method.java:498)
i.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
i.transport.Transport$1.run(Transport.java:200)
i.transport.Transport$1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
i.transport.Transport.serviceCall(Transport.java:196)
spring怎么读取jar文件p.TCPTransport.handleMessages(TCPTransport.java:573)
p.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834)
p.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688)
p.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688)
at java.security.AccessController.doPrivileged(Native Method)
p.TCPTransport$ConnectionHandler.run(TCPTransport.java:687)
at urrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at urrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
i.ptionReceivedFromServer(StreamRemoteCall.java:283)
i.uteCall(StreamRemoteCall.java:260)
i.server.UnicastRef.invoke(UnicastRef.java:161)
i.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:227)
i.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:179)
at com.sun.proxy.$Proxy165.customize(Unknown Source)
flect.NativeMethodAccessorImpl.invoke0(Native Method)
flect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
flect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at flect.Method.invoke(Method.java:498)
at i.RemoteUtil.invokeRemote(RemoteUtil.java:175)
at i.RemoteUtil.access$200(RemoteUtil.java:38)
at i.RemoteUtil$1$1$1pute(RemoteUtil.java:156)
at com.intellij.openapi.util.ClassLoaderUtil.runWithClassLoader(ClassLoaderUtil.java:66)
at uteWithClassLoader(RemoteUtil.java:227)
at i.RemoteUtil$1$1.invoke(RemoteUtil.java:153)
at com.sun.proxy.$Proxy165.customize(Unknown Source)
at org.jetbrains.idea.maven.server.MavenEmbedderWrapper.doCustomize(MavenEmbedderWrapper.java:96)
at org.jetbrains.idea.maven.WrappeeCreated(MavenEmbedderWrapper.java:49)
at org.jetbrains.idea.maven.OrCreateWrappee(RemoteObjectWrapper.java:42)
at org.jetbrains.idea.maven.server.MavenEmbedderWrapper.doCustomize(MavenEmbedderWrapper.java:96)
at org.jetbrains.idea.maven.server.MavenEmbedderWrapper.lambda$customizeForResolve$1(MavenEmbedderWrapper.java:69)
at org.jetbrains.idea.maven.server.RemoteObjectWrapper.perform(RemoteObjectWrapper.java:76)
at org.jetbrains.idea.maven.server.MavenEmbedderWrapper.customizeForResolve(MavenEmbedderWrapper.java:68)
at org.jetbrains.idea.maven.solve(MavenProjectsTree.java:1272)
at org.jetbrains.idea.maven.project.MavenProjectsProcessorResolvingTask.perform(MavenProjectsProcessorResolvingTask.java:45) at org.jetbrains.idea.maven.project.MavenProjectsProcessor.doProcessPendingTasks(MavenProjectsProcessor.java:135)
at org.jetbrains.idea.maven.project.MavenProjectsProcessor.access$000(MavenProjectsProcessor.java:32)
at org.jetbrains.idea.maven.project.MavenProjectsProcessor$2.run(MavenProjectsProcessor.java:109)
at org.jetbrains.idea.maven.utils.MavenUtil.lambda$runInBackground$5(MavenUtil.java:458)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:311)
at urrent.Executors$RunnableAdapter.call(Executors.java:511)
at urrent.FutureTask.run(FutureTask.java:266)
at urrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at urrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
此问题是由于版本不兼容导致的
可以下3.6.0

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。