The first is to refer to the blog, and the static link to download the static code shared by Baidu is: https://www.cnblogs.com/mmzuo-798/p/6434576.html
Later, add
location ^~ /static/ {
root E:/Workspaces/Idea15/demo/web/WEB-INF;
} to nginx's nginx.conf file
This code is useful to test in windows, but it is useless to change the path in linux.
The final solution does not delve into the problem of nginx, but a simpler general method, deploying static files static separately
1. When the code is called, it is written as
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":["mshare","weixin","sqq","tsina","qzone","tqq","tieba","youdao","ty","evernotecn","fbook","copy","print"],"bdPic":"","bdStyle":"0","bdSize":"16"},"slide":{"type":"slide","bdImg":"1","bdPos":"left","bdTop":"100"},"selectShare":{"bdContainerClass":null,"bdSelectMiniList":["qzone","tsina","tqq","renren","weixin"]}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='../static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
2. Deploy static files in the webapps directory of tomcat
tomcat can directly deploy static files
This allows direct access, as follows: https://jiashubing.cn/static/api/js/share.js