Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/spring-boot/5.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 boot 从1.5迁移到2.0后,spring引导无法启动_Spring Boot - Fatal编程技术网

Spring boot 从1.5迁移到2.0后,spring引导无法启动

Spring boot 从1.5迁移到2.0后,spring引导无法启动,spring-boot,Spring Boot,从1.5迁移到2.0后,我遇到了以下错误 *************************** APPLICATION FAILED TO START *************************** Description: Binding to target [Bindable@7178d811 type = org.springframework.boot.autoconfigure.web.ServerProperties, value = 'provided', annot

从1.5迁移到2.0后,我遇到了以下错误

***************************
APPLICATION FAILED TO START
***************************

Description:

Binding to target [Bindable@7178d811 type = org.springframework.boot.autoconfigure.web.ServerProperties, value = 'provided', annotations = array<Annotation>[[empty]]] failed:

    Property: server
    Value: 
    Origin: "server" from property source "class path resource [application.yml]"
    Reason: No converter found capable of converting from type [java.lang.String] to type [org.springframework.boot.autoconfigure.web.ServerProperties]

Action:

Update your application's configuration
application.yml如下所示: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

spring:
  resources:
    add-mappings: false
  mvc:
    throw-exception-if-no-handler-found: true
  autoconfigure.exclude:
    - org.springframework.boot.autoconfigure.gson.GsonAutoConfiguration
    - org.springframework.boot.autoconfigure.validation.ValidationAutoConfiguration
    - org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
    - org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
    - org.springframework.boot.autoconfigure.transaction.TransactionAutoConfiguration
    - org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration
    - org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration
    - org.springframework.boot.autoconfigure.data.RedisRepositoriesAutoConfiguration
    - org.springframework.boot.autoconfigure.transaction.jta.JtaAutoConfiguration

mock:
  id: 1314

authentication:
  jwt:
    publickey: /pubkey.pem

analyze:
  url: http://localhost:8000/analyze

server:
  error:
    path: /error
  restTemplate:
    connectTimeout: 2000
    readTimeout: 2000
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

spring:
  resources:
    add-mappings: false
  mvc:
    throw-exception-if-no-handler-found: true
  autoconfigure.exclude:
    - org.springframework.boot.autoconfigure.gson.GsonAutoConfiguration
    - org.springframework.boot.autoconfigure.validation.ValidationAutoConfiguration
    - org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
    - org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
    - org.springframework.boot.autoconfigure.transaction.TransactionAutoConfiguration
    - org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration
    - org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration
    - org.springframework.boot.autoconfigure.data.RedisRepositoriesAutoConfiguration
    - org.springframework.boot.autoconfigure.transaction.jta.JtaAutoConfiguration

mock:
  id: 1314

authentication:
  jwt:
    publickey: /pubkey.pem

analyze:
  url: http://localhost:8000/analyze

server:
  error:
    path: /error
  restTemplate:
    connectTimeout: 2000
    readTimeout: 2000

我不知道如何更新应用程序的配置。有人能给我一些建议来解决这个问题吗?

这是Spring Boot中的一个bug,请注意更新。

考虑到错误提到了这个文件,你能展示一下你的
应用程序.yml
文件吗?@g00glen00b我已经附加了这个文件