Prevent stack trace logging for custom exception in Spring Boot application

I’m using Spring Boot 2+
just add this line to your application.properties:

server.error.include-stacktrace=never

https://docs.spring.io/spring-boot/docs/current/api/org/springframework/boot/autoconfigure/web/ErrorProperties.IncludeStacktrace.html

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)