UBUNTU 无法开机,卡在界面 : Stopping User Manager for UID 121

UBUNTU 无法开机,卡在界面 : Stopping User Manager for UID 121” error原因:磁盘空间不足。解决方法:1进入recovery mode2clean 进入读写模式3然后 rm 删除腾出空间
分类: 其他 发布时间: 09-22 12:57 阅读次数: 0

spring boot redisson 配置

java bean@Configurationpublic class RedissonConfig { @Value("${com.xx.redission.cnfig}") private String REDIS_CONFIG; @Autowired private FileUtils fileUtils; @Bean public Redisson redisson() throws IOException { Confi
分类: 其他 发布时间: 09-22 12:57 阅读次数: 0

基于API KEY的访问权限控制

APK KEY存储@Entity@Data@Table(name = "authorization_key")public class AuthorizationKey { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) int id; @Column(name = "key_value", length = 64) String keyValue; @Column(name =
分类: 其他 发布时间: 09-22 12:57 阅读次数: 0

paypal 沙盒环境查看订阅信息

商家帐号https://www.sandbox.paypal.com/mep/dashboard查看订阅https://www.sandbox.paypal.com/billing/subscriptions消费者帐号https://www.sandbox.paypal.com/myaccount/summary
分类: 其他 发布时间: 09-22 12:57 阅读次数: 0

PayPal case系统

https://www.paypal-support.com/s/contactsupport
分类: 其他 发布时间: 09-22 12:57 阅读次数: 0

ios iap 沙盒环境订阅续费次数问题

官方文档中描述为最多6次。https://help.apple.com/app-store-connect/#/dev7e89e149d实测中发现,经常达不到6次,甚至一次续费都没有。还有就是升级之后,直接过期了(预期是:等本期结束,下一期切换套餐)。遇到同样问题的人:https://forums.developer.apple.com/thread/80917https://forums.developer.apple.com/message/414496#414496.
分类: 其他 发布时间: 09-22 12:57 阅读次数: 0

IOS IAP 判断订阅过期时是否需要判断 cancellation_date_ms 字段

IAP 订阅凭据中有 expires_date_ms 指示订阅的过期时间。当用户退款的时候,cancellation_date_ms 会被设置为退款时间。那么问题来了,退款的时候, 除了cancellation_date_ms 会变,expires_date_ms 也会相应的变化吗?根据这个帖子里的回复https://forums.developer.apple.com/thread/126815。答案是不会。因此,在判断订阅是否过期的时候,cancellation_date...
分类: 其他 发布时间: 09-22 12:57 阅读次数: 0

JAVA double 保留小数点后两位

public class NumberUtils { private NumberUtils() { } public static String doubleToString(Double value) { BigDecimal b = BigDecimal.valueOf(value).setScale(2, BigDecimal.ROUND_HALF_UP); return b.toString(); }}Test:@R.
分类: 其他 发布时间: 09-22 12:57 阅读次数: 0

mysql修改字段长度命令

alter table table_name modify column cloumn_name varchar(100);
分类: 其他 发布时间: 09-22 12:57 阅读次数: 0

Spring Boot Test 官方文档

https://docs.spring.io/spring-boot/docs/2.3.0.RELEASE/reference/html/spring-boot-features.html#boot-features-testing
分类: 其他 发布时间: 09-22 12:57 阅读次数: 0

Mysql spring boot 单元测试 @Transactional 数据不回滚的原因

数据库引擎不对,使用提MYISAM ,改成InnoDB 后解决。查看数据库引擎的方式有好几种,比如 用mysql workbenchjava 示例代码@SpringBootTest@RunWith(SpringRunner.class)@Slf4j@Transactionalpublic class StudentTest { @Autowired private StudentDAO StudentDAO; @Test public voi..
分类: 其他 发布时间: 09-22 12:57 阅读次数: 0

mysql 5.7 下载地址

https://downloads.mysql.com/archives/community/
分类: 其他 发布时间: 09-22 12:57 阅读次数: 0

Spring boot 从配置文件加载一个列表/数组到成员变量

@Value("#{'${com.xx.mail.default-cc-list}'.split(',')}")private List<String> ccList;[email protected],[email protected],[email protected]
分类: 其他 发布时间: 09-22 12:57 阅读次数: 0

mock mvc contrller test

@SpringBootTest@RunWith(SpringRunner.class)@AutoConfigureMockMvc@Transactionalpublic class InterceptorTest { @Autowired private MockMvc mockMvc; @Before public void setUp() throws Exception { } @Test public void testServ.
分类: 其他 发布时间: 09-22 12:57 阅读次数: 0

Android Studio Gradle Syn failed 解决

build.gradle 调整buildscript { repositories { maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'} google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.3.1' .
分类: 其他 发布时间: 09-22 12:57 阅读次数: 0

Git config 中添加帐号密码

vim .git/config[remote "origin"] url = https://username:[email protected]以zip包的形式下载git库后,提交或fetch的时候报无权限,可以通过这种方式添加帐号密码。
分类: 其他 发布时间: 09-22 12:57 阅读次数: 0

Android studio Gradle sync failed: Software caused connection abort: recv failed

Android studio Gradle sync failed: Software caused connection abort: recv failed经分析发现是无法下载默认的 gradle.ZIPhttps://services.gradle.org/distributions/gradle-6.1.1-all.zip替换成一个可以下载的地址即可:https://distfiles.macports.org/gradle/gradle-6.1.1-all.zip...
分类: 其他 发布时间: 09-22 12:57 阅读次数: 0

getServerPort 和 getLocalPort 的测试

本地配置了 nginx 转到一个 spring boot 应用:测试内容浏览器访问 abc.comnginx 代理转发到 localhost:9999观察spring boot 应用 中getServerPort 和 getLocalPort 及 header 内容spring boot 应用 java 代码@RestController@RequestMapping("/v1/ops")public class DebugController { @G...
分类: 其他 发布时间: 09-22 12:57 阅读次数: 0

ubuntu 下一个简单的spring boot jar包的启用脚本

比如java 程序中有环境变量的配置,需要在启动前修改环境变量,如:#!/bin/shexport TEST_ENV=dddddddddjava -jar demo4.jar对应的java代码如下:application.propertiestest-env=${TEST_ENV:hello}java@RestController@RequestMapping("/v1/ops")public class DebugController { @Valu
分类: 其他 发布时间: 09-22 12:57 阅读次数: 0

基于redis 的一个简单的访问频率控制

思路:1 某IP地址每分钟的访问次数记录以IP+当前分钟为key 在redis 中记录某个IP的调用次数,缓存过期时间为60缓。2 限制调用如果[1]的值超过阈值,则在redis中写入 ip+limited 为key的一个键值对,缓存过期时间即是不允许API再被这个IP调用的时间,比如100秒。当API在调用的时候,判断redis中是否存在 ip+limited的这个键值对,如果存,返回频率受限的错误码。伪代码:bool isLimted(String ip) {
分类: 其他 发布时间: 09-22 12:57 阅读次数: 0