kotlin基础知识(一)
# Kotlin 基础语法
方法的定义
1 | fun sum(a: Int, b: Int): Int { // Int 参数,返回值 Int |
1 | fun printSum(a: Int, b: Int): Unit { //无参数 |
格林威治时间转时间戳
# 示例:Jul 24, 2019 3:00:46 PM
# 示例代码:
12345678String str="Jul 24, 2019 3:00:46 PM";SimpleDateFormat format=new SimpleDateFormat("MMM dd, yyyy hh:mm:ss aa", Locale.ENGLISH);try { System.out.println(format.format(new Date()));...
more...
ssm 集成 websocket
# 添加架包
在 pom 文件中添加一下坐标
1 | <dependency> |
安卓服务里监听按钮
# 一。使用 AccessibilityService 实现按钮监听,在资源文件夹新建 xml 资源文件夹,然后新 accessibility_service_config.xml。
1 | <?xml version="1.0" encoding="utf-8"?> |
SpringBoot 集成Websocket问题解决(一)
# 一 Spring boot 打包 war 包时 websocket 报错问题
错误信息:’serverEndpointExporter’ defined in class path resource [red/bury/rtc/WebSocketConfig.class]: Invocation of init method failed;
解决办法:当使用外部 Tomcat 时,需要注释掉一下代码,即可正常启动
1 | @Bean |
swagger自动生成api文档
https://blog.csdn.net/u013985664/article/details/80009274
https://blog.csdn.net/qq_36911145/article/details/82854417
more...
docker 创建镜像与提交
# 创建镜像
- 创建文件 Dockerfile
1 | FROM centos:7 |