How to disable static content handle in spring-boot?

I'm using this link to configure security and spring-boot as base for other. But static resource handler provided by spring-boot is executed before security settings. So if I send POST request, static content handler respond me that method POST not supported. If I request GET method, static response handler catch it and try to find resourse. So any requests catched by static content handler and not go to security filters.

How can I disable static content filters/handlers provided by spring-boot?


You can disable the static resource handling by setting spring.resources.add-mappings=false in your application.properties.

With that out of the way, are you sure that it will resolve your problem? Spring Security runs as a filter before the static resource handling and I doubt that disabling the resource handling will help. Perhaps it'll make it easier to identify the underlying problem, though.


  • How can i get resources from JAR file
  • blur image in android studio
  • mySQL Query - Selecting Fields
  • How to update the file with multiple lines without deleting the contents of the original file using
  • Problem with sockets in C#
  • Condor job using DAG with some jobs needing to run the same host
  • Index.php as custom error page
  • Generating random numbers directly inside a .htaccess file
  • Return null in boolean to checkbox state converter in XAML
  • Azure table query partial partitionkey guid match
  • SIP API media codecs
  • File extension of zlib zipped html page?
  • Does Apportable support to build library binary (.a/.so)?
  • Execute scripts AJAX returns
  • Align navbar back button on right side
  • DotNetZip - Calculate final zip size before calling Save(stream)
  • How to add date and time under each post in guestbook in google app engine
  • How to redirect a user to a different server and include HTTP basic authentication credentials?
  • Trying to switch camera back to front but getting exception
  • Symfony2: How to get request parameter
  • How to make Safari send if-modified-since header?
  • Web-crawler for facebook in python
  • Warning: Can't call setState (or forceUpdate) on an unmounted component
  • Is there a mandatory requirement to switch app.yaml?
  • File upload with ng-file-upload throwing error
  • ExecuteAsync RestSharp to allow backgroundWorker CancellationPending c#
  • AngularJs get employee from factory
  • log4net write single file for each call to log.info
  • Load html files in TinyMce
  • Free memory of cv::Mat loaded using FileStorage API
  • Getting error when using KSoap library to consume .NET web services
  • Angular 2 constructor injection vs direct access
  • Memory offsets in inline assembly
  • Turn off referential integrity in Derby? is it possible?
  • How can I remove ASP.NET Designer.cs files?
  • python draw pie shapes with colour filled
  • Is there any way to bind data to data.frame by some index?
  • Programmatically clearing map cache
  • How can i traverse a binary tree from right to left in java?
  • jQuery Masonry / Isotope and fluid images: Momentary overlap on window resize