Is there a way in Spring Boot (mvc) to log a custom exception and throw it without its stack trace being visible in the log file? But for any other exception st
Be wary of Spring Boot DevTools.
Despite NEVER being the default for server.error.include-stacktrace, if you include Spring Boot DevTools it overides to ALWAYS.
NEVER
server.error.include-stacktrace
ALWAYS
If you're interested in more detail, see this commit, which became part of Spring Boot 2.1.0+