笔记
河汉清浅浅
若有笔墨能消磨 ,或写春秋伴王榻
展开
-
informix 常用命令
informix 常用命令转载 2022-06-14 11:23:52 · 1852 阅读 · 0 评论 -
常用端口3000,80被占用问题解决
常用端口3000,80被占用问题解决原创 2022-06-09 11:18:17 · 938 阅读 · 0 评论 -
Java解决多线程无法@Autowired注入,手动获取Bean对象
问题当我们使用多线程时,又想注入一个service给我们使用,但是我们发现service总是为null。原因new Thread不在spring容器中,也就无法获得spring中的bean对象。解决方案1.最简单的方法 把要注入的service通过构造方法传过去2.通过ApplicationContext手动获取Bean(Springboot版本,其他自行百度) 定义congfigpackage cn.pconline.config;import org.sprin..转载 2021-04-08 17:10:40 · 944 阅读 · 0 评论 -
笔记:string格式化
public static void main(String[] args) { /*Properties props = System.getProperties(); // 获得系统属性集 String osName = props.getProperty("os.name"); // 操作系统名称 String osArch = props.getProperty("os.arch"); // 操作系统构架 String osVersi.转载 2021-03-24 14:46:53 · 138 阅读 · 0 评论 -
时间精确到毫秒(17位)
今天用到了时间精确到17位,在这个时间段中取值import java.text.SimpleDateFormat;//精确到17位的当前时间public static String getLocalTime17() { SimpleDateFormat format17 = new SimpleDateFormat("yyyyMMddHHmmssSSS"); return format17.format(new Date()); }获取当前时间还有获取当前时间的另一.原创 2020-11-11 16:39:27 · 5584 阅读 · 1 评论 -
接口接收raw(JSON)格式的数据,使用注解@RequestBody不起作用
在接收对方推送数据时,格式为raw(JSON)类型数据,接口使用注解@RequestBody不起作用可以使用如下方式:String data = getbody(request);PlatformInfo bean = new Gson().fromJson(data, PlatformInfo.class);不使用注解@RequestBody,直接从request中拿数据,下面是getbody方法public String getbody(HttpServletRequest req原创 2020-10-28 11:09:59 · 4775 阅读 · 3 评论 -
笔记:开发微信小程序支付和H5支付
https://pay.weixin.qq.com/index.php/core/home/login?return_url=%2F 微信支付https://pay.weixin.qq.com/wiki/doc/api/index.html 微信支付开发文档https://mp.weixin.qq.com/微信小程序支付 实现步骤https://www.cnblogs.com/demodashi/p/10486875.html1.在小程序中获取用户的登录信息,成功后可以获取到用...原创 2020-08-31 18:10:04 · 390 阅读 · 0 评论