java - Spring boot serving static resource -


i work on spring boot application. i'm trying serve static content spring. want serve resource stored in /c:/frontend/files/ directory whenever request comes in url matching pattern: /file/**:

 @override public void addresourcehandlers(resourcehandlerregistry registry) {      registry             .addresourcehandler("/file/**")             .addresourcelocations("file:///c:/frontend/files/" );  } 

but when try access resource using url: http://localhost:9999/file/app.min.js

i have problem

there unexpected error (type=not acceptable, status=406). not find acceptable representation 

i resolved problem. it's related "spring-cloud-config-server". delete config: org.springframework.cloud spring-cloud-config-server


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -