reason:
Because the back-end does not write cross-domain-related information to the header, the front-end cannot load data.
analysis:
1. First, check whether there are cross-domain-related configurations in the project, and then find out whether there are configurations.
2. This should be added only when the controller is executed.
3. Because our project has built an interceptor to intercept the token parsing into user-related information, because if there is no token expiration, the interceptor will throw an exception. When returning, cross-domain-related things will not be added. So the front end cannot be loaded.
Solution:
Add response and related cross domain information to the interceptor
In addition, you need to know the execution sequence of interceptors and filters
* ** -> Filter -> Interceptor -> ControllerAdvice -> Aspect -> Controller
Read More:
- How to Solve Error: Failed to load ApplicationContext
- [Solved] Failed to load response data: no data found for resource with given identifier
- How to Fix Failed to load resource: the server responded with a status of 404()
- How to Solve Springboot Error: Failed to convert value of type
- How to Solve Application failed to start error
- How to Solve Error: Heartbeating to master:7182 failed.
- How to Solve Hyperf Failed to Start Error After Aliyun ACM Installed
- [Solved] docker failed to solve: failed to solve with frontend dockerfile.v0: failed to create LLB definition
- How to Solve Docker failed to initialize Error
- How to Solve Loadrunner Error: Failed to find .cfg file
- How to Solve Logstash error: failed to execute action
- How to Solve Git Error: error: failed to push some refs to……
- How to Solve Error: could not read ok from ADB Server.failed to start daemon error: cannot connect to daemon
- How to Solve Chrome Error: net::ERR_FAILED
- How to Solve Vue & Django Cross-domain Issue
- How to Solve NPM update check failed Error
- How to Solve MVC Error: Build failed.
- How to Solve Rabbitmq Error: Failed to start RabbitMQ broker
- How to Solve Import antd Error: Module build failed
- Internalerror: GPU sync failed error (How to Solve)