
Java
狗-sin狗
这个作者很懒,什么都没留下…
展开
-
cannot unmarshal string into Go value of type models.SaveDashboardCommand
cannot unmarshal string into Go value of type models.SaveDashboardCommand在Java服务端使用retrofit发起http请求,创建grafana告警面板时,报上述错误打印retrofit 请求日志如下–> POST http://xxxxx/api/dashboards/db http/1.1Content-Type: application/jsonContent-Length: 62Authorization:原创 2022-04-15 10:26:39 · 1828 阅读 · 0 评论 -
springboot启动失败 Failed to configure a DataSource
APPLICATION FAILED TO STARTDescription:Failed to configure a DataSource: ‘url’ attribute is not specified and no embedded datasource could be configured.Reason: Failed to determine a suitable driver class解决办法:添加exclude@SpringBootApplication(exclude.原创 2022-01-30 14:28:02 · 877 阅读 · 0 评论 -
lombok 不兼容idea 2021.2的解决办法
在idea 2021.2的plugins 中搜索不到lombok,从idea 插件官网中搜索lombok可以看到当前最高只支持到2020.2。 地址:https://plugins.jetbrains.com/plugin/6317-lombok/versions解决办法:下载0.34-2020.2解压下载的压缩包用36原创 2021-10-06 19:19:18 · 3519 阅读 · 0 评论 -
Queue的add和offer的区别(代码验证)
当队列满时,即队列中元素的个数等于队列的容量时,再插入元素,add方法将抛异常IllegalStateException,offer方法返回false.验证如下验证offer public static void main(String[] args) { Queue queue = new ArrayBlockingQueue(3); queue.offer(1); queue.offer(1); queue.offer(1);原创 2021-08-28 17:32:51 · 547 阅读 · 0 评论 -
Java日志 SLF4J使用
SLF4J Simple Logging Facade for Java (SLF4J), SLF4J是各种日志记录框架(例如java.util.logging,logback,log4j)的抽象,在使用 时需绑定所需的日志框架。需引入以下依赖,仅包含slf4j-api-1.7.30.jar <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api&l原创 2021-04-10 21:27:26 · 1179 阅读 · 0 评论 -
keytool查看jks证书
在AndroidStudio生成apk的时候,需要一个秘钥库,之前生成的,但是别名忘记了。就可以用以下命令来进行查看keytool -list -v -keystore xxx.jks然后输入密钥库扣了即可原创 2021-01-27 12:44:40 · 1490 阅读 · 0 评论 -
线程和线程池总结
文章目录线程1.什么是线程?2.线程的创建方式3.线程常用方法3.1 sleep:使当前线程睡眠一段时间3.2 join:等待某个线程运行结束3.3 yield :让出线程执行权3.4 interrupt: 打断某个(阻塞)线程3.5 setPriority:3.6 setDaemon4. 线程的状态5. 线程安全问题的解决`synchronized`线程池1.什么是线程池,为什么要有线程池?2.核心线程是如何保持不被销毁的?3.Executors返回的4种线程池3.1 newFixedThreadPool原创 2020-06-22 23:13:53 · 822 阅读 · 0 评论