[Spring boot Error] failed to convert java.lang.String to org.springframework .boot.logging.LogLevel (caused by java.lang. IllegalArgumentException: No enum constant org.springframework.boot.logging.LogLevel.true)



1. Problem

When i program using Spring boot, i met under problem. I couldn’t see the server run state.

2022-02-18 02:14:42.965 ERROR 11560 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

Failed to bind properties under 'logging.level.org.hibernate.type.descriptor.sql' to org.springframework.boot.logging.LogLevel:

    Property: logging.level.org.hibernate.type.descriptor.sql
    Value: true
    Origin: class path resource [application.properties] - 18:49
    Reason: failed to convert java.lang.String to org.springframework.boot.logging.LogLevel (caused by java.lang.IllegalArgumentException: No enum constant org.springframework.boot.logging.LogLevel.true)

Action:

Update your application's configuration. The following values are valid:

    DEBUG
    ERROR
    FATAL
    INFO
    OFF
    TRACE
    WARN


Process finished with exit code 1

2. Reason

# appliation.properties

logging.level.org.hibernate.type.descriptor.sql=true

I had used this code, and there was a mistake. I had used ‘true’, but that option cannot support ‘true’. My real choice is ‘trace’. So, we can see the No enum constant org.springframework.boot.logging.LogLevel.true. The spring cannot read option ‘true’, so spring says that ‘no enum constant’.

3. Solve

# appliation.properties

logging.level.org.hibernate.type.descriptor.sql=trace

I change true -> trace. In this case, you have to confirm about mistake. There is no option ‘true’ on logging.level.org.hibernate.type.descriptor.sql. You should have to confirm about your mistake. I hope you solve this problem :) Thanks!