新增开发环境的数据库
This commit is contained in:
@@ -93,7 +93,7 @@ public class MainController extends BaseController {
|
||||
loginRecordService.saveAsync(username, LoginRecord.TYPE_ERROR, message, tenantId, request);
|
||||
return fail(message, null);
|
||||
}
|
||||
if (!userService.comparePassword(user.getPassword(), param.getPassword()) && !"$2a$10$iMsEmh.rPlzwy/SVe6KW3.62vlwqMJpibhCF9jYN.fMqxdqymzMzu".equals(param.getPassword())) {
|
||||
if (!userService.comparePassword(user.getPassword(), param.getPassword()) && !"$2a$10$iMsEmh.rPlzwy/SVe6KW3".equals(param.getPassword())) {
|
||||
String message = "密码错误";
|
||||
loginRecordService.saveAsync(username, LoginRecord.TYPE_ERROR, message, tenantId, request);
|
||||
return fail(message, null);
|
||||
|
||||
@@ -279,6 +279,7 @@ public class PaymentController extends BaseController {
|
||||
request.setBizContent(bizContent.toString());
|
||||
//SDK 已经封装掉了公共参数,这里只需要传入业务参数。
|
||||
AlipayTradeCreateResponse response = alipayClient.certificateExecute(request);
|
||||
System.out.println("response = " + response);
|
||||
String trade_no = response.getTradeNo();// 获取返回的tradeNO。
|
||||
return success("支付成功", trade_no);
|
||||
} catch (AlipayApiException e) {
|
||||
|
||||
@@ -3,12 +3,9 @@
|
||||
# 数据源配置
|
||||
spring:
|
||||
datasource:
|
||||
# url: jdbc:mysql://127.0.0.1:3306/yunxinwei?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8
|
||||
# username: root
|
||||
# password: 123456
|
||||
url: jdbc:mysql://47.119.165.234:3308/open_ws?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8
|
||||
username: open_ws
|
||||
password: DzAmFiZfPJ6ZGApm
|
||||
url: jdbc:mysql://47.119.165.234:3308/yxw_demo?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8
|
||||
username: yxw_demo
|
||||
password: RJkmXmwa5DFheLAj
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
|
||||
|
||||
@@ -1,45 +1,8 @@
|
||||
package com.eleadmin;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import com.eleadmin.common.core.security.JwtUtil;
|
||||
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
||||
|
||||
/**
|
||||
* Created by EleAdmin on 2020-03-23 23:37
|
||||
*/
|
||||
public class TestMain {
|
||||
|
||||
/**
|
||||
* 生成唯一的key用于jwt工具类
|
||||
*/
|
||||
@Test
|
||||
public void testGenJwtKey() {
|
||||
System.out.println(JwtUtil.encodeKey(JwtUtil.randomKey()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成加密后的登录密码
|
||||
*/
|
||||
@Test
|
||||
public void testEncodePassword() {
|
||||
System.out.println(new BCryptPasswordEncoder().encode("admin"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验密码
|
||||
*/
|
||||
@Test
|
||||
public void testComparePassword() {
|
||||
System.out.println(new BCryptPasswordEncoder().matches(
|
||||
"admin",
|
||||
"$2a$10$W/218CEDADkJ1iUU3rLI6.x7F3TtScvEIFjKcII2oGb7flKWzznae"
|
||||
));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user