public class URLDownload { public static void main(String[] args) throws IOException { URL url=new URL("https://m10.music.126.net/20210204001424/b2ecd ...
分类:
Web程序 时间:
2021-02-04 12:17:48
阅读次数:
0
因为最近在研究线程安全和相关的可变对象和不可变对象的内容。 查看了下 StringBuffer 的源代码。 StringBuffer 的官方解释是,一个线程安全可变序列的字符串。StringBuffer 与 String 是一样的,但是是线程安全的。你可以在任何时候会存储一些字符串。有关 Strin ...
分类:
编程语言 时间:
2021-02-04 12:16:08
阅读次数:
0
注:代码已托管在GitHub上,地址是:https://github.com/Damaer/Mybatis-Learning ,项目是mybatis-14-oneself-many2one,需要自取,需要配置maven环境以及mysql环境(sql语句在resource下的test.sql中),觉得 ...
分类:
其他好文 时间:
2021-02-04 12:15:49
阅读次数:
0
RestController和Controller的区别 @RestController = @ResponseBody + @Controller 如果只是使用@RestController注解Controller,则Controller中的方法无法返回jsp页面,或者html,配置的视图解析器 ...
分类:
编程语言 时间:
2021-02-04 12:13:15
阅读次数:
0
1 package operation; 2 3 public class Demo1 { 4 public static void main(String[] args) { 5 //二元运算符 6 //Ctrl+D :复制当前行到下一行 7 int a=10; 8 int b=20; 9 int ...
分类:
其他好文 时间:
2021-02-04 12:10:02
阅读次数:
0
前言 在 jdk 的 juc 工具包中,提供了一种延迟队列 DelayQueue。延迟队列用处非常广泛,比如我们最常见的场景就是在网购或者外卖平台中发起一个订单,如果不付款,一般 15 分钟后就会被关闭,这个直接用定时任务是不好实现的,因为每个用户下单的时间并不确定,所以这时候就需要用到延迟队列。 ...
分类:
其他好文 时间:
2021-02-04 12:07:11
阅读次数:
0
public SearchResult search(String keyWord, Integer page) { PageRequest pageRequest = PageRequest.of(page - 1, ROWS); //设置分页参数 SearchQuery searchQuery ...
分类:
编程语言 时间:
2021-02-04 12:02:49
阅读次数:
0
返回String类型的数据 页面代码 <!-- jQuery导入 --> <script src="js/jquery-2.1.0.min.js"></script> <script type="text/javascript"> $(function() { //失去焦点事件 $("#userna ...
分类:
编程语言 时间:
2021-02-04 11:49:59
阅读次数:
0
由于工作需要必须将word文档内容粘贴到编辑器中使用 但发现word中的图片粘贴后变成了file:///xxxx.jpg这种内容,如果上传到服务器后其他人也访问不了,网上找了很多编辑器发现没有一个能直接解决这个问题 考虑到自己除了工作其他时间基本上不使用windows,因此打算使用nodejs来解决 ...
分类:
Web程序 时间:
2021-02-04 11:43:37
阅读次数:
0
一、声名值和变量 1. val变量 1.1 隐式声明变量 scala> val myStr = "Hello World!" myStr: String = Hello World! 1.2 显式声明变量的类型 scala> val myStr2 : String = "Hello World!" ...
分类:
其他好文 时间:
2021-02-04 11:40:00
阅读次数:
0