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
Post a Comment