解析 application.yml

huangapple go评论100阅读模式
英文:

Parsing application.yml

问题

以下是您要翻译的内容:

"Hi I try build my spring application with gradle and it gives bellow error code

> ERROR org.springframework.boot.SpringApplication - Application startup
> failed org.yaml.snakeyaml.scanner.ScannerException: mapping values are
> not allowed here in 'reader', line 12, column 12:
> ssl:

The yml is

  1. liquibase:
  2. changeLog: classpath:/config/liquibase/changelog/master-changelog.groovy
  3. spring:
  4. datasource:
  5. url: jdbc:postgresql://x:xxxx/xxxxx
  6. username: x
  7. password: x
  8. server:
  9. port: 8443
  10. ssl:
  11. enabled: true
  12. key-store: classpath:keystore.p12
  13. key-store-password: x
  14. keyStoreType: pkcs12
  15. keyAlias: x
  16. server:
  17. port: 8080

What is the error ?"

英文:

Hi I try build my spring application with gradle and it gives bellow error code

> ERROR org.springframework.boot.SpringApplication - Application startup
> failed org.yaml.snakeyaml.scanner.ScannerException: mapping values are
> not allowed here in 'reader', line 12, column 12:
> ssl:

The yml is

  1. liquibase:
  2. changeLog: classpath:/config/liquibase/changelog/master-changelog.groovy
  3. spring:
  4. datasource:
  5. url: jdbc:postgresql://x:xxxx/xxxxx
  6. username: x
  7. password: x
  8. server:
  9. port: 8443
  10. ssl:
  11. enabled: true
  12. key-store: classpath:keystore.p12
  13. key-store-password: x
  14. keyStoreType: pkcs12
  15. keyAlias: x
  16. server:
  17. port: 8080

What is the error ?

答案1

得分: 0

ssl和port应该处于同一级别,就像这样

  1. server:
  2. port: 8443
  3. ssl:
  4. enabled: true
  5. key-store: classpath:keystore.p12
  6. key-store-password: x
  7. keyStoreType: pkcs12
  8. keyAlias: x
  9. additionalPorts: 8080, 8081
英文:

ssl and port should be on the same level, like so

  1. server:
  2. port: 8443
  3. ssl:
  4. enabled: true
  5. key-store: classpath:keystore.p12
  6. key-store-password: x
  7. keyStoreType: pkcs12
  8. keyAlias: x
  9. additionalPorts: 8080, 8081

huangapple
  • 本文由 发表于 2020年8月14日 03:58:34
  • 转载请务必保留本文链接:https://go.coder-hub.com/63402404.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定