我正在尝试在Quarkus中迁移spring boot应用程序。经过一些尝试,我发现并不是所有的bean都被发现了,所以我尝试按照这个指南创建一个jandex索引https://quarkus.io/guides/cdi-reference.除了spring web工件之外,其他所有依赖项都很容易被发现,但当spring web出现时,它会显示:
无法解析工件组织。springframework:SpringWeb:null
存储库应该https://mvnrepository.com/artifact/org.springframework/spring-web/4.3.28.RELEASE
这是我的application.yaml档案。
quarkus:
http:
port: 8998
log:
level: DEBUG
index-dependency:
bear-arch-rest:
group-id: org.acme.bear
artifact-id: bear-arch-rest
bear-arch-core:
group-id: org.acme.bear
artifact-id: bear-arch-core
bear-arch-exception:
group-id: org.acme.bear
artifact-id: bear-arch-exception
spring-hateoas:
group-id: org.springframework.hateoas
artifact-id: spring-hateoas
spring-web:
group-id: org.springframework
artifact-id: spring-web
然后,当我尝试构建项目时,它会显示一条错误消息,其中包含:
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:1.3.4.Final-redhat-00001:build (default) on project darwin-on-quarkus-rest: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR] [error]: Build step io.quarkus.deployment.index.ApplicationArchiveBuildStep#build threw an exception: java.lang.RuntimeException: java.lang.RuntimeException: Could not resolve artifact org.springframework:spring-web:null. Please make sure it is present and contains a META-INF/MANIFEST.MF file. Note that artifacts that are part of the same project may not always be resolvable, in this case you should generate a META-INF/jandex.idx file instead using the Jandex Maven plugin.
[ERROR] at io.quarkus.deployment.index.ApplicationArchiveBuildStep.getIndexDependencyPaths(ApplicationArchiveBuildStep.java:148)
[ERROR] at io.quarkus.deployment.index.ApplicationArchiveBuildStep.scanForOtherIndexes(ApplicationArchiveBuildStep.java:110)
[ERROR] at io.quarkus.deployment.index.ApplicationArchiveBuildStep.build(ApplicationArchiveBuildStep.java:97)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:498)
[ERROR] at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:938)
[ERROR] at io.quarkus.builder.BuildContext.run(BuildContext.java:273)
[ERROR] at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2046)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1578)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
[ERROR] at java.lang.Thread.run(Thread.java:748)
[ERROR] at org.jboss.threads.JBossThread.run(JBossThread.java:479)
[ERROR] Caused by: java.lang.RuntimeException: Could not resolve artifact org.springframework:spring-web:null. Please make sure it is present and contains a META-INF/MANIFEST.MF file. Note that artifacts that are part of the same project may not always be resolvable, in this case you should generate a META-INF/jandex.idx file instead using the Jandex Maven plugin.
[ERROR] at io.quarkus.deployment.index.ClassPathArtifactResolver.getArtifact(ClassPathArtifactResolver.java:68)
[ERROR] at io.quarkus.deployment.index.ArtifactIndex.getPath(ArtifactIndex.java:14)
[ERROR] at io.quarkus.deployment.index.ApplicationArchiveBuildStep.getIndexDependencyPaths(ApplicationArchiveBuildStep.java:136)
[ERROR] ... 14 more
[ERROR] -> [Help 1]
我试图使用分类器,但这并没有改变任何事情。
当我试图删除quarkus时。索引依赖性。spring web property和我尝试构建,结果显示:
[INFO] --- quarkus-maven-plugin:1.3.4.Final-redhat-00001:build (default) @ darwin-on-quarkus-rest ---
[INFO] [org.jboss.threads] JBoss Threads version 3.1.1.Final-redhat-00001
[WARNING] [io.quarkus.arc.processor.BeanArchives] Failed to index org.springframework.web.filter.AbstractRequestLoggingFilter: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader
[INFO] [io.quarkus.arc.processor.IndexClassLookupUtils] Class for name: org.springframework.web.filter.AbstractRequestLoggingFilter was not found in Jandex index. Please ensure the class is part of the index.
[WARNING] [io.quarkus.arc.processor.BeanArchives] Failed to index org.springframework.scheduling.annotation.AsyncConfigurerSupport: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader
[INFO] [io.quarkus.arc.processor.IndexClassLookupUtils] Class for name: org.springframework.scheduling.annotation.AsyncConfigurerSupport was not found in Jandex index. Please ensure the class is part of the index.
[WARNING] [io.quarkus.arc.processor.BeanArchives] Failed to index org.springframework.web.servlet.config.annotation.WebMvcConfigurer: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader
[INFO] [io.quarkus.arc.processor.IndexClassLookupUtils] Class for name: org.springframework.web.servlet.config.annotation.WebMvcConfigurer was not found in Jandex index. Please ensure the class is part of the index.
[WARNING] [io.quarkus.arc.processor.BeanArchives] Failed to index org.springframework.web.servlet.HandlerInterceptor: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader
[INFO] [io.quarkus.arc.processor.IndexClassLookupUtils] Class for name: org.springframework.web.servlet.HandlerInterceptor was not found in Jandex index. Please ensure the class is part of the index.
[WARNING] [io.quarkus.arc.processor.BeanArchives] Failed to index org.springframework.beans.factory.DisposableBean: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader
[INFO] [io.quarkus.arc.processor.IndexClassLookupUtils] Class for name: org.springframework.beans.factory.DisposableBean was not found in Jandex index. Please ensure the class is part of the index.
[WARNING] [io.quarkus.arc.processor.BeanArchives] Failed to index org.springframework.http.converter.json.MappingJackson2HttpMessageConverter: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader
[INFO] [io.quarkus.arc.processor.IndexClassLookupUtils] Class for name: org.springframework.http.converter.json.MappingJackson2HttpMessageConverter was not found in Jandex index. Please ensure the class is part of the index.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 05:45 min
[INFO] Finished at: 2020-08-03T14:30:48+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:1.3.4.Final-redhat-00001:build (default) on project darwin-on-quarkus-rest: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR] [error]: Build step io.quarkus.arc.deployment.ArcProcessor#registerBeans threw an exception: java.lang.IllegalArgumentException: Producer method return type not found in index: org.springframework.http.converter.json.MappingJackson2HttpMessageConverter
[ERROR] at io.quarkus.arc.processor.Types.getProducerMethodTypeClosure(Types.java:176)
[ERROR] at io.quarkus.arc.processor.Beans.createProducerMethod(Beans.java:172)
[ERROR] at io.quarkus.arc.processor.BeanDeployment.findBeans(BeanDeployment.java:763)
[ERROR] at io.quarkus.arc.processor.BeanDeployment.registerBeans(BeanDeployment.java:206)
[ERROR] at io.quarkus.arc.processor.BeanProcessor.registerBeans(BeanProcessor.java:122)
[ERROR] at io.quarkus.arc.deployment.ArcProcessor.registerBeans(ArcProcessor.java:262)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:498)
[ERROR] at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:938)
[ERROR] at io.quarkus.builder.BuildContext.run(BuildContext.java:273)
[ERROR] at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2046)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1578)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
[ERROR] at java.lang.Thread.run(Thread.java:748)
[ERROR] at org.jboss.threads.JBossThread.run(JBossThread.java:479)
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
谢谢你的帮助!
我收到了quarkus支持部门的回复,你可以在那里找到https://quarkusio.zulipchat.com/#narrow/stream/187030-用户/主题/Quarkus。20CDI。3A。20Spring网。20.人工制品。我可以。不是。20Be。解决了。
简而言之:
我刚刚安装了Eclipse Neon PDE,并尝试用“Hello World”模板构建一个简单的插件项目。不幸的是,在创建插件项目之后,我就遇到了许多“导入org.eclipse无法解决”的错误。 我已经尝试过清理项目,并对构建路径进行了修改,但没有成功。 有人能帮我解决这个错误吗?也许我错过了显而易见的东西。
我试图用Spring DI创建一个简单的HelloWorld应用程序。我创建了一个Java项目并导入了一些教程类,其中一个很简单: 然而,我得到了以下错误:。我正在使用Eclipse Spring Tool Suite 3.7.2,当我单击“修复项目设置”时,我认为通过使用这个Eclipse版本,它会为我添加这些依赖项。我在这里做错了什么?即使在STS中,我也需要手动添加这些依赖项吗?如果是,正确
我正试图在Eclipse中创建一个OSGiJavaFX项目。我得到以下错误(在下面注释掉) 如何让导入正常工作? 我在Eclipse上安装了e(fx)来帮助JavaFx开发。 e(fx)clipse e(fx)clipse是一个Eclipse插件,用于编写JavaFX2.0应用程序 版权所有(c)2011-2012最佳解决方案。在Systemhaus GmbH。保留所有权利。 更新 java版本“
我在eclipse中遇到以下错误: 我尝试了mockito-core.jar3.0.0的升级版本,但问题没有解决。Eclipse版本是:2018-12 (4.10.0) 对如何解决这个问题有什么建议吗?
我正在尝试从当前用户那里获取特定租金的列表。 控制器中的代码: account\u id是外键。 运行后,我发现错误: 我做错了什么?
我想写一个简单的不存在的地方子句HQL查询。我不熟悉Hibernate,我有一些小问题。 我的查询如下所示: 我想选择所有包含IDUser当天购买的门票的天数。所有这些都与id为IDFest的节日相关。 我的堆栈跟踪: 映射类: Day.java Festivals.java 门票。Java语言