What is the use of these properties in application.properties file
and when do we use them?
spring.mvc.throw-exception-if-no-handler-found=true
spring.sources.add-mappings=false
What is the use of these properties in application.properties file
and when do we use them?
spring.mvc.throw-exception-if-no-handler-found=true
spring.sources.add-mappings=false
According to these resources
you can use
spring.resources.add-mappings=false
for disabling the default handling of classpath/ JAR/ file system resources (like css or image files) in case you would like to restrict access to them and create your own mappings
and
spring.mvc.throw-exception-if-no-handler-found=true
if you wish an exception of type NoHandlerFoundException to be thrown in case no handler is found in processing a request (and maybe catch it and take same appropriate action).