我正在尝试转换由spring boot应用程序到spring原生使用本机图像Maven插件。我按照这里提到的https://docs.spring.io/spring-native/docs/0.9.x/reference/htmlsingle/设置GraalVM和本机映像
本机映像打包成功。但应用程序无法以erorr启动
java.lang.IllegalStateException: Error processing condition on org.springframework.cloud.sleuth.autoconfig.brave.BraveAutoConfiguration
at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:60) ~[com.xxx.yyy.application:2.4.3]
at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:108) ~[na:na]
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader$TrackedConditionEvaluator.shouldSkip(ConfigurationClassBeanDefinitionReader.java:489) ~[na:na]
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader$TrackedConditionEvaluator.shouldSkip(ConfigurationClassBeanDefinitionReader.java:478) ~[na:na]
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:140) ~[na:na]
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:129) ~[na:na]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:342) ~[com.xxx.yyy.application:5.3.4]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:246) ~[com.xxx.yyy.application:5.3.4]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:311) ~[na:na]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:112) ~[na:na]
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:745) ~[na:na]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:563) ~[na:na]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:144) ~[na:na]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:767) ~[com.xxx.yyy.application:2.4.3]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) ~[com.xxx.yyy.application:2.4.3]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:426) ~[com.xxx.yyy.application:2.4.3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:326) ~[com.xxx.yyy.application:2.4.3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1311) ~[com.xxx.yyy.application:2.4.3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1300) ~[com.xxx.yyy.application:2.4.3]
at com.xxx.yyy.application.main(Application.java:23) ~[com.xxx.yyy.application:1.5-SNAPSHOT]
Caused by: java.lang.IllegalStateException: java.io.FileNotFoundException: class path resource [org/springframework/cloud/sleuth/autoconfig/brave/AnyTracerModePropertySetCondition$OnConcreteTracerMode.class] cannot be opened because it does not exist
at org.springframework.boot.autoconfigure.condition.AbstractNestedCondition$MemberConditions.getMetadata(AbstractNestedCondition.java:149) ~[na:na]
at org.springframework.boot.autoconfigure.condition.AbstractNestedCondition$MemberConditions.getMemberConditions(AbstractNestedCondition.java:121) ~[na:na]
at org.springframework.boot.autoconfigure.condition.AbstractNestedCondition$MemberConditions.<init>(AbstractNestedCondition.java:114) ~[na:na]
at org.springframework.boot.autoconfigure.condition.AbstractNestedCondition.getMatchOutcome(AbstractNestedCondition.java:62) ~[com.xxx.yyy.application:2.4.3]
at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:47) ~[com.xxx.yyy.application:2.4.3]
... 19 common frames omitted
Caused by: java.io.FileNotFoundException: class path resource [org/springframework/cloud/sleuth/autoconfig/brave/AnyTracerModePropertySetCondition$OnConcreteTracerMode.class] cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:180) ~[na:na]
at org.springframework.core.type.classreading.SimpleMetadataReader.getClassReader(SimpleMetadataReader.java:55) ~[na:na]
at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:49) ~[na:na]
at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:103) ~[na:na]
at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:81) ~[na:na]
at org.springframework.boot.autoconfigure.condition.AbstractNestedCondition$MemberConditions.getMetadata(AbstractNestedCondition.java:146) ~[na:na]
... 23 common frames omitted
spring原生版本:0.9.0
<dependency>
<groupId>org.springframework.experimental</groupId>
<artifactId>spring-native</artifactId>
<version>0.9.0</version>
</dependency>
spring boot版本:2.4.3
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.3</version>
<relativePath/>
</parent>
spring cloud版本:2020.0.1
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>2020.0.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
好的,我刚刚发现sleuth
还不被spring Native支持。
spring初始值设定项中的警告消息:
The following was discovered as part of building this project:
The following dependency is not known to work with Spring Native: 'Sleuth'. As a result, your application may not work as expected.
我的程序编译了所有内容,我没有出错,但我实际上期望tomcat应该永久在端口8080上。输出中也没有Spring。在另一个项目中,我做的一切都很好。谢谢你帮助我。 我的父母: 我的tarter.class: 我的Starter-Pom: 控制台输出: 然后什么都不会发生了。谢谢你的帮助。
问题内容: 我有一个Java应用程序。 该应用程序具有一个设置,该设置决定该应用程序是否在启动时启动。 目前,我可以通过在“启动项目”文件夹中放置/删除快捷方式来实现此目的。 但是,我想知道是否有更好的方法来处理此行为。 编辑 是的,它是Windows。抱歉,之前没有清除该内容。 该应用程序具有一个用户可以在其中触发动作的UI,并且该应用程序在运行时会定期在后台运行一些任务。 @Peter,如何在
我正试图在设备上启动我的应用程序。它正在模拟器上成功发射。 null null 会不会是带有代码签名的东西? 目前我已将其设置为“不编码签名”
我已经在tomcat服务器上安装了应用程序。在启动和加载应用程序的过程中,我有以下堆栈跟踪的错误。如何解决这个问题? apache-tomcat-7.0.47/webapps/petclinic 2016年10月27日下午12:14:36 org。阿帕奇。卡塔琳娜。果心标准上下文起始内部 严重:ServletContainerInitializer处理javax时出错。servlet。Servle
我想对Spring数据使用ElasticSearch。我使用的是Spring 5、Spring Boot 2和ElasticSearch 7.4。Docker compose: 马文: 存储库: 配置: 和错误时启动应用程序: 引起:java.lang.NoSuchMEDError:org.springframework.http.HttpHeaders.(Lorg/springframe/uti