JAVA
bug–0/1
这个作者很懒,什么都没留下…
展开
-
com.sun.mail.smtp.SMTPSendFailedException: 503 Error: need EHLO and AUTH first !
org.springframework.mail.MailSendException: Failed messages: com.sun.mail.smtp.SMTPSendFailedException: 503 Error: need EHLO and AUTH first !; message exception details (1) are:Failed message 1:com.sun.mail.smtp.SMTPSendFailedException: 503 Error: need原创 2021-05-20 15:17:44 · 2243 阅读 · 4 评论 -
Exception 和 RuntimeException区别
Exception 和 RuntimeException都是异常,他们有什么区别呢?概念Exception :受检查的异常,这种异常是强制我们catch或throw的异常。你遇到这种异常必须进行catch或throw,如果不处理,编译器会报错。比如:IOException。RuntimeException:运行时异常,这种异常我们不需要处理,完全由虚拟机接管。比如我们常见的NullPointerException,我们在写程序时不会进行catch或throw。RuntimeException也是继原创 2021-04-09 17:13:04 · 703 阅读 · 0 评论 -
@RequestBody用与不用
1. 使用与不使用@requestBody①. 使用@requestBody当请求content_type为:application/json类型的请求,数据类型为json时, json格式如下:{“aaa”:“111”,“bbb”:“222”}②. 不使用@requestBody当请求content_type为:application/x-www-form-urlencoded类型的或multipart/form-data时,数据格式为aaa=111&bbb=222。2. $.ajax原创 2020-11-26 19:43:29 · 1931 阅读 · 0 评论 -
java WebService简单教程
https://app.yinxiang.com/shard/s48/nl/1/9ebdee41-13bb-40f8-a465-4262c6040c37?title=java%20WebService%E7%AE%80%E5%8D%95%E6%95%99%E7%A8%8B原创 2020-08-13 16:45:52 · 188 阅读 · 0 评论 -
Failed to load the JNI shared library 的解决方法
原因:JDK与eclipse版本不兼容,会出现打开报错:Failed to load the JNI shared library…这个问题。一般是本机安装的eclipse(32bit/64bit)和JDK的(32bit/64bit)版本不一致造成的。JDK (x86 32bit,x86_64 64bit)Eclipse(x86 32bit,x86_64 64bit)解决办法:重新安装JDK或是重新安装Eclipse。检查办法:1、先查看本机的JDK是多少bit?输入java -versio.原创 2020-08-06 15:02:52 · 593 阅读 · 0 评论 -
不使用synchronized和lock,如何实现一个线程安全的单例?
不使用synchronized和lock,如何实现一个线程安全的单例?单例,大家肯定都不陌生,这是Java中很重要的一个设计模式。稍微了解一点单例的朋友也都知道实现单例是要考虑并发问题的,一般情况下,我们都会使用synchronized来保证线程安全。那么,如果有这样一道面试题:不使用synchronized和lock,如何实现一个线程安全的单例?你该如何回答?C类应聘者:可以使用饿汉模式实...转载 2019-08-08 10:59:51 · 408 阅读 · 0 评论 -
Java 中File和MultipartFile的相互转化
File file = new File("D:\\testmultif.txt");FileInputStream input = new FileInputStream(file);MultipartFile multipartFile = new MockMultipartFile("file", file.getName(), "text/plain", IOUtils.toByte...原创 2019-09-26 21:56:09 · 3733 阅读 · 0 评论 -
Cannot get a STRING value from a NUMERIC cell poi
rowContent.getCell(j).setCellType(CellType.STRING);原创 2019-09-26 21:56:58 · 627 阅读 · 0 评论 -
java工具类调用Service层类的方法
@Autowired private C_clienttype_Service TYpeservice; private static C_clienttype_Service typeservice; @Autowired private C_client_src_Service SRCservice; private static C_client_src_Service src...原创 2019-09-26 21:57:31 · 2781 阅读 · 0 评论