原创 mock mvc contrller test

@SpringBootTest @RunWith(SpringRunner.class) @AutoConfigureMockMvc @Transactional public class InterceptorTest {

原创 Spring boot 從配置文件加載一個列表/數組到成員變量

@Value("#{'${com.xx.mail.default-cc-list}'.split(',')}") private List<String> ccList;   com.xx.mail.default-cc-list=a

原创 mysql 5.7 下載地址

https://downloads.mysql.com/archives/community/

原创 Spring Boot Test 官方文檔

https://docs.spring.io/spring-boot/docs/2.3.0.RELEASE/reference/html/spring-boot-features.html#boot-features-testing  

原创 Mysql spring boot 單元測試 @Transactional 數據不回滾的原因

數據庫引擎不對,使用提 MYISAM ,改成InnoDB 後解決。 查看數據庫引擎的方式有好幾種,比如 用 mysql workbench java 示例代碼 @SpringBootTest @RunWith(SpringRunner

原创 JAVA double 保留小數點後兩位

public class NumberUtils { private NumberUtils() { } public static String doubleToString(Double value) {

原创 mysql修改字段長度命令

alter table table_name modify column cloumn_name varchar(100);

原创 ios iap 沙盒環境訂閱續費次數問題

官方文檔中描述爲最多6次。 https://help.apple.com/app-store-connect/#/dev7e89e149d 實測中發現,經常達不到6次,甚至一次續費都沒有。 還有就是升級之後,直接過期了(預期是:等本期結

原创 IOS IAP 判斷訂閱過期時是否需要判斷 cancellation_date_ms 字段

IAP 訂閱憑據中有 expires_date_ms 指示訂閱的過期時間。 當用戶退款的時候, cancellation_date_ms 會被設置爲退款時間。 那麼問題來了,退款的時候, 除了cancellation_date_ms  會

原创 基於API KEY的訪問權限控制

APK KEY存儲 @Entity @Data @Table(name = "authorization_key") public class AuthorizationKey { @Id @GeneratedValu

原创 PayPal case系統

https://www.paypal-support.com/s/contactsupport

原创 paypal 沙盒環境查看訂閱信息

商家帳號 https://www.sandbox.paypal.com/mep/dashboard 查看訂閱 https://www.sandbox.paypal.com/billing/subscriptions       消費者

原创 spring boot redisson 配置

java bean @Configuration public class RedissonConfig { @Value("${com.xx.redission.cnfig}") private String RED

原创 UBUNTU 無法開機,卡在界面 : Stopping User Manager for UID 121

UBUNTU 無法開機,卡在界面 : Stopping User Manager for UID 121” error    原因:磁盤空間不足。 解決方法: 1進入recovery mode 2clean 進入讀寫模式 3然後 rm 刪

原创 kafka 執行 cli 命令時報錯:Error: JMX connector server communication error: service:jmx:rmi:

docker exec -it  [container-id] /bin/bash 後,執行 kafka-topics.sh --list --zookeeper ip:port 後報錯  Error: JMX connector ser