Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring 版本3.9.0 server.port作为启动配置中的VM arg退出工作_Spring_Spring Boot_Spring Tool Suite - Fatal编程技术网

Spring 版本3.9.0 server.port作为启动配置中的VM arg退出工作

Spring 版本3.9.0 server.port作为启动配置中的VM arg退出工作,spring,spring-boot,spring-tool-suite,Spring,Spring Boot,Spring Tool Suite,自从将STS升级到3.9.0版以来,在启动配置中通过VM args设置server.port属性似乎出现了一个新问题。在调试/运行配置屏幕的参数选项卡上,在VM参数窗口中,我有-Dserver.port=8123。这个启动配置已经运行了6个多月,但是在升级到3.9.0之后,现在我得到了一个与解析端口号相关的NumberFormat异常原因:java.lang.NumberFormatException:对于输入字符串:“8123 noverify”如果我将端口号分配移动到application.

自从将STS升级到3.9.0版以来,在启动配置中通过VM args设置server.port属性似乎出现了一个新问题。在调试/运行配置屏幕的参数选项卡上,在VM参数窗口中,我有
-Dserver.port=8123
。这个启动配置已经运行了6个多月,但是在升级到3.9.0之后,现在我得到了一个与解析端口号相关的NumberFormat异常<代码>原因:java.lang.NumberFormatException:对于输入字符串:“8123 noverify”如果我将端口号分配移动到application.yml属性文件中,问题就会消失。如果在启动配置中使用Spring arg格式--server.port=8123,问题也会消失。问题仅限于解析
-Dserver.port=
VM arg。我不知道这个问题是否会影响到除
server.port
之外的其他VM参数

编辑:(堆栈跟踪)


你的问题是由一个bug引起的。但是,在撰写本文时,它还没有发布


您可以通过打开首选项、导航到
Spring->Boot
并清除
Java虚拟机参数来解决这个问题,以触发应用程序的快速启动
,默认情况下,它包含
-noverify-XX:TieredStopAtLevel=1

我遇到了同样的问题。谢谢
2017-07-31 09:35:17.011 [main] DEBUG c.b.m.m.MtrDaemonApplication - Running with Spring Boot v1.3.3.RELEASE, Spring v4.2.5.RELEASE
2017-07-31 09:35:17.012 [main] INFO  c.b.m.m.MtrDaemonApplication - The following profiles are active: local
2017-07-31 09:35:17.012 [main] DEBUG org.springframework.boot.SpringApplication - Loading source class com.bnsf.mtr.mtd.MtrDaemonApplication
2017-07-31 09:35:17.065 [background-preinit] DEBUG org.jboss.logging - Logging Provider: org.jboss.logging.Slf4jLoggerProvider found via system property
2017-07-31 09:35:17.067 [background-preinit] INFO  org.hibernate.validator.internal.util.Version - HV000001: Hibernate Validator 5.2.4.Final
2017-07-31 09:35:17.079 [main] DEBUG org.springframework.boot.context.config.ConfigFileApplicationListener - Activated profiles local
2017-07-31 09:35:17.079 [main] DEBUG org.springframework.boot.context.config.ConfigFileApplicationListener - Skipped (empty) config file 'classpath:/application.properties'
2017-07-31 09:35:17.080 [main] DEBUG org.springframework.boot.context.config.ConfigFileApplicationListener - Profiles already activated, '[dev]' will not be applied
2017-07-31 09:35:17.080 [main] DEBUG org.springframework.boot.context.config.ConfigFileApplicationListener - Loaded config file 'classpath:/application.yml'
2017-07-31 09:35:17.080 [main] DEBUG org.springframework.boot.context.config.ConfigFileApplicationListener - Skipped (empty) config file 'classpath:/application.properties' for profile local
2017-07-31 09:35:17.080 [main] DEBUG org.springframework.boot.context.config.ConfigFileApplicationListener - Loaded config file 'classpath:/application.yml' for profile local
2017-07-31 09:35:17.081 [main] INFO  org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext - Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@3d9fc57a: startup date [Mon Jul 31 09:35:17 CDT 2017]; root of context hierarchy
2017-07-31 09:35:17.086 [main] DEBUG org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext - Bean factory for org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@3d9fc57a: org.springframework.beans.factory.support.DefaultListableBeanFactory@5bb3131b: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.context.event.internalEventListenerProcessor,org.springframework.context.event.internalEventListenerFactory,mtrDaemonApplication]; root of factory hierarchy
2017-07-31 09:35:17.104 [background-preinit] DEBUG org.hibernate.validator.internal.engine.resolver.DefaultTraversableResolver - Found javax.persistence.Persistence on classpath containing 'getPersistenceUtil'. Assuming JPA 2 environment. Trying to instantiate JPA aware TraversableResolver
2017-07-31 09:35:17.106 [background-preinit] DEBUG org.hibernate.validator.internal.engine.resolver.DefaultTraversableResolver - Instantiated JPA aware TraversableResolver of type org.hibernate.validator.internal.engine.resolver.JPATraversableResolver.
2017-07-31 09:35:18.708 [main] ERROR org.springframework.boot.SpringApplication - Application startup failed
java.lang.IllegalStateException: Error processing condition on org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConfiguration$EndpointWebMvcConfiguration
at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:64)
at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:102)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader$TrackedConditionEvaluator.shouldSkip(ConfigurationClassBeanDefinitionReader.java:436)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader$TrackedConditionEvaluator.shouldSkip(ConfigurationClassBeanDefinitionReader.java:425)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:127)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:116)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:333)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:243)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:273)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:98)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:678)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:520)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766)
at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1191)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1180)
at org.springframework.boot.SpringApplication$run.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)
at c.b.m.m.MtrDaemonApplication.main(MtrDaemonApplication.groovy:94)
Caused by: org.springframework.core.convert.ConversionFailedException: Failed to convert from type [java.lang.String] to type [java.lang.Integer] for value '8123-noverify'; nested exception is java.lang.NumberFormatException: For input string: "8123-noverify"
at org.springframework.core.convert.support.ConversionUtils.invokeConverter(ConversionUtils.java:41)
at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:192)
at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:176)
at org.springframework.core.env.PropertySourcesPropertyResolver.getProperty(PropertySourcesPropertyResolver.java:98)
at org.springframework.core.env.PropertySourcesPropertyResolver.getProperty(PropertySourcesPropertyResolver.java:65)
at org.springframework.core.env.AbstractEnvironment.getProperty(AbstractEnvironment.java:541)
at org.springframework.boot.bind.RelaxedPropertyResolver.getProperty(RelaxedPropertyResolver.java:82)
at org.springframework.boot.bind.RelaxedPropertyResolver.getProperty(RelaxedPropertyResolver.java:72)
at org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConfiguration$ManagementServerPort.getPortProperty(EndpointWebMvcAutoConfiguration.java:357)
at org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConfiguration$ManagementServerPort.get(EndpointWebMvcAutoConfiguration.java:309)
at org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConfiguration$OnManagementMvcCondition.getMatchOutcome(EndpointWebMvcAutoConfiguration.java:295)
at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:47)
... 22 common frames omitted
Caused by: java.lang.NumberFormatException: For input string: "8123-noverify"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.valueOf(Unknown Source)
at org.springframework.util.NumberUtils.parseNumber(NumberUtils.java:194)
at org.springframework.core.convert.support.StringToNumberConverterFactory$StringToNumber.convert(StringToNumberConverterFactory.java:62)
at org.springframework.core.convert.support.StringToNumberConverterFactory$StringToNumber.convert(StringToNumberConverterFactory.java:49)
at org.springframework.core.convert.support.GenericConversionService$ConverterFactoryAdapter.convert(GenericConversionService.java:425)
at org.springframework.core.convert.support.ConversionUtils.invokeConverter(ConversionUtils.java:35)
... 33 common frames omitted
2017-07-31 09:35:18.714 [main] INFO  org.springframework.boot.logging.ClasspathLoggingApplicationListener - Application failed to start with classpath: [...]