Baidu given there is no solution to solve the problem, come to here to advice you great god
The Controller layer code
@ Controller
Public class AiShuInsert {
@ PostMapping (" AiShuInsert ")
@ ResponseBody
@ ApiOperation (" love book cloud file upload ")
@ ApiImplicitParams ({
@ ApiImplicitParam (name="url", value="https://bbs.csdn.net/topics/file address", the required=true)})
Public ResponseEntityt querySap2Excel (@ RequestBody String url, it request, HttpServletResponse response) {
ResponseEntityt returnDto=new ResponseEntityt ();
Return returnDto;
}
}
Application. The properties of code
# application name
Spring. The application. The name=AiShu
# application service WEB access port
Server port=10010
Nginx server configuration file
The location/AiShu {
Proxy_pass http://127.0.0.1:10010/AiShu;
Proxy_set_header Host $Host;
Proxy_set_header X - Real - IP $remote_addr;
Proxy_set_header X - Forwarded - For $remote_addr;
Proxy_pass_request_headers on;
Proxy_connect_timeout 60;
Proxy_read_timeout 600;
Proxy_send_timeout 600;
If ($request_method='OPTIONS') {
Add_header 'Access - Control - Allow - Headers'' * ';
Add_header 'Access - Control - Allow - Origin' '*';
The return of 204;
}
If ($request_method='POST') {
Add_header 'Access - Control - Allow - Headers'' * ';
Add_header 'Access - Control - Allow - Origin' '*';
}
If ($request_method='GET') {
Add_header 'Access - Control - Allow - Headers'' * ';
Add_header 'Access - Control - Allow - Origin' '*';
}
}
The location/AiShu {
Proxy_pass http://127.0.0.1:10010/AiShu;
Proxy_set_header Host $Host;
Proxy_set_header X - Real - IP $remote_addr;
Proxy_set_header X - Forwarded - For $remote_addr;
Proxy_pass_request_headers on;
Proxy_connect_timeout 60;
Proxy_read_timeout 600;
Proxy_send_timeout 600;
If ($request_method='OPTIONS') {
Add_header 'Access - Control - Allow - Headers'' * ';
Add_header 'Access - Control - Allow - Origin' '*';
The return of 204;
}
If ($request_method='POST') {
Add_header 'Access - Control - Allow - Headers'' * ';
Add_header 'Access - Control - Allow - Origin' '*';
}
If ($request_method='GET') {
Add_header 'Access - Control - Allow - Headers'' * ';
Add_header 'Access - Control - Allow - Origin' '*';
}
}
CodePudding user response:
@ PostMapping try add a "/"CodePudding user response:
Delete AiShu try, try, summary,CodePudding user response:
Should be the problem of your page, the path path does not exist, there is no to the controller