1)先去阿里申請個免費的證書,審覈經過後,能夠下載證書。前端
tomcat8的conf/server.xml中補充 <Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol" maxThreads="150" SSLEnabled="true" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" keystoreFile="cert/19588171.pfx" keystoreType="PKCS12" keystorePass="6jM1ixl31" useBodyEncodingForURI="true" />mysql
2)在前端請求後端的地址,所有改爲 https://sss.com:8443web
3)在微信平臺的開發設置-》服務器域名-》request合法域名,填寫https://sss.com:8443sql
4)發佈小程序apache