本教程以电脑扫码支付为基础,APP原理一致
前期准备
1.进入开发平台,选择电脑网站支付
https://open.alipay.com/developmentDocument.htm
2.下载SDK进行快速入门
3.下载下载沙箱环境
https://openhome.alipay.com/platform/appDaily.htm?tab=info
4.生成 RSA 密钥
https://docs.open.alipay.com/291/105971/ (官方教程)
开发环境搭建
SpringBoot开发
pom中添加配置信息(用于视图解析)
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
yml中添加内容
spring:
datasource:
url: jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=UTF-8&useSSL=false
username: root
password: root
driver-class-name: com.mysql.cj.jdbc.Driver
thymeleaf:
cache: false
prefix: classpath:/templates/
suffix: .html