基于若依对接微信jssdk

基于若依对接微信jssdk

java:

package com.ruoyi.system.controller;


import com.alibaba.fastjson2.JSONObject;
import com.ruoyi.common.core.domain.AjaxResult;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Formatter;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;

@RestController
@RequestMapping("/api")
public class ApiController {
   

    String appId = "更换你的appid";
    String appSecret = "更换你的appSecret";

    /**
     * 微信配置
     * @param url  路径
     * @return
     */
    @RequestMapping("/wxConfig")
    public AjaxResult geWxConfig(@RequestParam(value = "url") String url) throws IOException {
   
//      

你可能感兴趣的:(微信,java,jssdk)