Ich beginne meinen Frühling Boot-Anwendung von Eclipse mit dem VM-ParameterConverterNotFoundException: -Dserver.port = 80-NOVERIFY Kein gefunden Konverter ... String
-Dserver.port=80
Anwendung .yml
server:
port: 8080
aber ich bekomme die folgende Ausnahme „Kein Konverter gefunden fähig Konvertieren von Typ [java.lang.String] in type [java.lang.Integer] ".
Running with Spring Boot v1.5.4.RELEASE, Spring v4.3.9.RELEASE
...
2017-07-19 11:26:55.299 ERROR 5968 --- [ main] o.s.b.b.PropertiesConfigurationFactory : Properties configuration failed validation
2017-07-19 11:26:55.299 ERROR 5968 --- [ main] o.s.b.b.PropertiesConfigurationFactory : Field error in object 'server' on field 'port': rejected value [80-noverify]; codes [typeMismatch.server.port,typeMismatch.port,typeMismatch.java.lang.Integer,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [server.port,port]; arguments []; default message [port]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'java.lang.Integer' for property 'port'; nested exception is org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.lang.String] to type [java.lang.Integer]]
Field error in object 'server' on field 'port': rejected value [80-noverify]; codes [typeMismatch.server.port,typeMismatch.port,typeMismatch.java.lang.Integer,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [server.port,port]; arguments []; default message [port]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'java.lang.Integer' for property 'port'; nested exception is org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.lang.String] to type [java.lang.Integer]]
...
***************************
APPLICATION FAILED TO START
***************************
Description:
Binding to target [email protected]daea failed:
Property: server.port
Value: 80-noverify
Reason: Failed to convert property value of type 'java.lang.String' to required type 'java.lang.Integer' for property 'port'; nested exception is org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.lang.String] to type [java.lang.Integer]
Action:
Update your application's configuration
Wenn ich die Eigenschaft server.port
in meinem application.yml
es funktioniert, kein Problem.
Was mache ich falsch? Danke für jede Hilfe.
können wir uns Ihre 'application.yml' anschauen Ich vermute, dass Ihre Port-Zeichenfolge das Problem hier ist –
können Sie auch die' pom.xml' anzeigen? Sieht so aus, als ob Sie gerade einen Konverter vermissen. Schließen Sie alle Abhängigkeiten aus, die mit Spring Boot verbunden sind? – cahen
http://stackoverflow.com/questions/37102273/environment-variables-and-value-cant-work-together-on-spring-boot –