Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/13.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 cloud server.port无法使用活动配置文件_Spring_Cloud_Config - Fatal编程技术网

spring cloud server.port无法使用活动配置文件

spring cloud server.port无法使用活动配置文件,spring,cloud,config,Spring,Cloud,Config,配置服务器: src\main\resources\configPath\cloud config repo\movie.yml: --- spring: profiles: cloud jpa: show_sql: false database: MYSQL hibernate: ddl-auto: none eureka: client: serviceUrl: defaultZone: http://discovery-k

配置服务器: src\main\resources\configPath\cloud config repo\movie.yml:

---
spring:
  profiles: cloud
  jpa:
    show_sql: false
    database: MYSQL
    hibernate:
      ddl-auto: none
eureka:
  client:
    serviceUrl:
      defaultZone: http://discovery-kb.cfapps.io/eureka/
  instance:
    hostname: movie-kb.cfapps.io
    nonSecurePort: 80
ribbon:
  eureka:
    enabled: true
---
application:
  name: movie
spring:
  profiles: lattice
  jpa:
    show_sql: false
    hibernate:
      ddl-auto: none
  datasource:
    platform: hsqldb
server:
  port: 9006
eureka:
  client:
    serviceUrl:
      defaultZone: ${EUREKA_CLIENT_SERVICEURL_DEFAULTZONE:http://localhost:8761/eureka/}
  instance:
    hostname: ${vcap.application.uris[0]:localhost:9006}
    nonSecurePort: 80
ribbon:
  eureka:
    enabled: true
---
spring:
  profiles: development
  jpa:
    show_sql: false
    hibernate:
      ddl-auto: update
server:
    port: 9005
eureka:
  client:
    serviceUrl:
      defaultZone: http://localhost:8761/eureka/
  instance:
    preferIpAddress: true
ribbon:
  eureka:
    enabled: true
当我启动移动服务时,Tomcat使用端口8080(http)初始化。 为什么不是9005? 移动服务: src\main\resources\application.yml:

spring:
  profiles:
    active: development

你如何告诉Spring考虑<代码>…电影?YML?Spring:应用程序:名字:电影