简体   繁体   中英

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM