A small problem with Vue

NetWork Error

1. The first case

It is a common cross domain request error. At this time, you only need to add the "@ crossorigin" annotation on the controller class

2. The second case

If the cross domain request annotation has been added, but the content cannot be accessed, you must pay attention to whether the front and rear paths and access methods are consistent.

3. The third case

The first two have been solved, but the resources cannot be accessed. At this time, it should be noted that after changing the back-end code, the service must be restarted, which is also a careless problem.

4. The fourth case

When you encounter the problem of file upload, and when using nginx as the back-end service API, you should pay attention to adding the following line of code in the nginx configuration. The cause of this problem is "413 (request entity too large)"

client_max_body_size 1024m;

last

Still that problem, you still need to be careful in typing the code; This time, I'm still not familiar with the front end and the initial integration of back-end micro services.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>