Spring-boot: Exception when banner-mode = off

Created on 3 May 2018  路  2Comments  路  Source: spring-projects/spring-boot

Hi!

I use spring-boot 2.0.1.RELEASE with maven as build tool and yml for main application configuration. When I set banner-mode: off

spring:
  main:
    banner-mode: off

Then I see follow exception

java.lang.IllegalStateException: Cannot bind to SpringApplication
Caused by: org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'spring.main.banner-mode' to org.springframework.boot.Banner$Mode
Caused by: org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.lang.Boolean] to type [org.springframework.boot.Banner$Mode]

It throws only on off mode

invalid

Most helpful comment

This is described in the documentation. You need to quote off to prevent YAML turning it into a boolean false.

All 2 comments

This is described in the documentation. You need to quote off to prevent YAML turning it into a boolean false.

@wilkinsona Thank you :)

Was this page helpful?
0 / 5 - 0 ratings