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 -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -