更新java17,springboot3.3.9,maven3.9.10,
This commit is contained in:
@@ -1,59 +0,0 @@
|
||||
package com;
|
||||
|
||||
import com.peanut.common.utils.MD5Utils;
|
||||
import com.peanut.modules.pay.weChatPay.config.WechatPayConfig;
|
||||
import com.peanut.modules.pay.weChatPay.dto.WechatPaymentInfo;
|
||||
import org.junit.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.security.PrivateKey;
|
||||
@SpringBootTest
|
||||
public class VxApiTest {
|
||||
|
||||
|
||||
@Resource
|
||||
private WechatPayConfig wechatPayConfig;
|
||||
|
||||
@Test
|
||||
public void textgetPrivateKey(){
|
||||
//获取私钥路径
|
||||
String keyPemPath = wechatPayConfig.getKeyPemPath();
|
||||
//获取私钥
|
||||
PrivateKey privateKey = wechatPayConfig.getPrivateKey(keyPemPath);
|
||||
//输出很长的字符串 如果有问题转json试试
|
||||
System.out.println(privateKey);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void getWxPayConfig(){
|
||||
String mchId =wechatPayConfig.getMchId();
|
||||
System.out.println(mchId);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void mytest(){
|
||||
WechatPaymentInfo wechatPaymentInfo = new WechatPaymentInfo();
|
||||
wechatPaymentInfo.setTotalAmount(new BigDecimal(56));
|
||||
wechatPaymentInfo.setOrderSn("testtest");
|
||||
System.out.println(wechatPaymentInfo.toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void mmm(){
|
||||
String saltMD5 = MD5Utils.getSaltMD5("29698073wjl");
|
||||
System.out.println(saltMD5);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void mmmm(){
|
||||
// boolean saltverifyMD5 = MD5Utils.getSaltverifyMD5("29698073wjl", "15af9ed9b06a442b90b09e78d21a3635890e24196db1a61e");
|
||||
boolean saltverifyMD5 = MD5Utils.getSaltverifyMD5("29698073wjl", "f33643591f4e942d3918f582555719247f6e90131ea1dc0a");
|
||||
System.out.println(saltverifyMD5);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,9 +1,6 @@
|
||||
package com.peanut;
|
||||
|
||||
import com.peanut.modules.app.utils.JwtUtils;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@@ -11,14 +8,6 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
public class JwtTest {
|
||||
@Autowired
|
||||
private JwtUtils jwtUtils;
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
String token = jwtUtils.generateToken(1);
|
||||
|
||||
System.out.println(token);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user