解析 application.yml

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

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

liquibase:
    changeLog: classpath:/config/liquibase/changelog/master-changelog.groovy

spring:
    datasource:
        url: jdbc:postgresql://x:xxxx/xxxxx
        username: x
        password: x

server:
    port: 8443
        ssl: 
            enabled: true
            key-store: classpath:keystore.p12
            key-store-password: x
            keyStoreType: pkcs12
            keyAlias: x

server:
    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

liquibase:
    changeLog: classpath:/config/liquibase/changelog/master-changelog.groovy

spring:
    datasource:
        url: jdbc:postgresql://x:xxxx/xxxxx
        username: x
        password: x

server:
    port: 8443
        ssl: 
            enabled: true
            key-store: classpath:keystore.p12
            key-store-password: x
            keyStoreType: pkcs12
            keyAlias: x

server:
    port: 8080

What is the error ?

答案1

得分: 0

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

server:
    port: 8443
    ssl: 
        enabled: true
        key-store: classpath:keystore.p12
        key-store-password: x
        keyStoreType: pkcs12
        keyAlias: x
    additionalPorts: 8080, 8081
英文:

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

server:
    port: 8443
    ssl: 
        enabled: true
        key-store: classpath:keystore.p12
        key-store-password: x
        keyStoreType: pkcs12
        keyAlias: x
    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:

确定