上一页 1 2 3 4 5 6 ··· 11 下一页
摘要: 在《阿里巴巴java开发手册》中指出了线程资源必须通过线程池提供,不允许在应用中自行显示的创建线程,这样一方面是线程的创建更加规范,可以合理控制开辟线程的数量;另一方面线程的细节管理交给线程池处理,优化了资源的开销。而线程池不允许使用Executors去创建,而要通过ThreadPoolExecut 阅读全文
posted @ 2020-12-09 16:29 逐梦寻欢 阅读(211) 评论(0) 推荐(0) 编辑
摘要: 一、IO流关闭顺序 代码示例: public static void saveBase64(String data, String path, Long name) { OutputStreamWriter ops = null; BufferedWriter bw = null; File fil 阅读全文
posted @ 2020-12-09 12:00 逐梦寻欢 阅读(2123) 评论(0) 推荐(0) 编辑
摘要: import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.ut 阅读全文
posted @ 2020-12-02 14:52 逐梦寻欢 阅读(898) 评论(0) 推荐(0) 编辑
摘要: 服务端代码 import java.io.IOException; import java.net.InetSocketAddress; import java.net.ServerSocket; import java.net.Socket; import java.nio.ByteBuffer; 阅读全文
posted @ 2020-10-22 16:20 逐梦寻欢 阅读(636) 评论(0) 推荐(0) 编辑
摘要: *************SMB服务端代码实现**************************************************** github:https://github.com/FileSysOrg/jfileserver 代码官方配置文档:https://filesys. 阅读全文
posted @ 2020-10-16 14:42 逐梦寻欢 阅读(622) 评论(0) 推荐(0) 编辑
摘要: 一、Linux下搭建smb服务 1、安装服务 # yum install samba samba-common -y # useradd -s /sbin/nologin george --创建samba服务登录用户 # smbpasswd -a george --将用户 george 设置为smb 阅读全文
posted @ 2020-10-09 17:30 逐梦寻欢 阅读(1095) 评论(0) 推荐(0) 编辑
摘要: 基于Maven的SpringBoot项目,通过配置spring-boot-devtools模块来使Spring Boot应用支持热部署,无需每次更改代码都要手动项目,提高开发者的开发效率。 1、添加依赖 <!--SpringBoot热部署--> <dependency> <groupId>org.s 阅读全文
posted @ 2020-09-24 16:29 逐梦寻欢 阅读(441) 评论(0) 推荐(0) 编辑
摘要: spring cloud项目中,如果想要使配置文件中的配置修改后不用重启项目即生效,可以使用@RefreshScope配置来实现 1、添加Maven依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spri 阅读全文
posted @ 2020-09-24 11:19 逐梦寻欢 阅读(9309) 评论(0) 推荐(1) 编辑
摘要: 原文链接:https://blog.csdn.net/ErickPang/article/details/84558228 更改consul上服务注册名称,可以修改“ spring.cloud.consul.discovery.instance-id ”配置项实现 但是不能获取到服务ip,此时可以在 阅读全文
posted @ 2020-09-04 09:50 逐梦寻欢 阅读(541) 评论(0) 推荐(0) 编辑
摘要: 一、浮点计算中发生精度丢失 无论你使用的是什么编程语言,在使用浮点型数据进行精确计算时,你都有可能遇到计算结果出错的情况。 public class FloatTest { public static void main(String[] args) { float f1 = 6.6f; float 阅读全文
posted @ 2020-07-09 17:28 逐梦寻欢 阅读(2202) 评论(0) 推荐(1) 编辑
上一页 1 2 3 4 5 6 ··· 11 下一页