Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
321 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,291 @@ | ||
## 博客输出demo相关内容记录 | ||
## 技术Demo 和 精彩文章 | ||
|
||
|
||
|
||
👉**技术文章首发在这里** | ||
|
||
<p> | ||
<a href="https://dayarch.top"> | ||
<img src="https://img.shields.io/badge/BLOG-%E6%97%A5%E6%8B%B1%E4%B8%80%E5%85%B5-brightgreen.svg" alt="个人博客"> | ||
</a> | ||
<a href="#公众号"> | ||
<img src="https://img.shields.io/badge/%E5%85%AC%E4%BC%97%E5%8F%B7-%E6%97%A5%E6%8B%B1%E4%B8%80%E5%85%B5-blue.svg" alt="个人公众号"> | ||
</a> | ||
</p> | ||
|
||
|
||
🔉**Slogan** | ||
|
||
- 你有一个思想,我有一个思想,我们交换后,一个人就有两个思想 | ||
- If you can NOT explain it simply, you do NOT understand it well enough | ||
|
||
--- | ||
|
||
|
||
|
||
![](https://cdn.jsdelivr.net/gh/FraserYu/img-host/blog-imgtaidu (1).png) | ||
|
||
|
||
|
||
--- | ||
<p> | ||
<a href="#精选文章"> | ||
<img src="https://img.shields.io/badge/%E5%96%84%E7%94%A8Ctrl+F-%E9%98%85%E8%AF%BB%E7%B2%BE%E9%80%89%E6%96%87%E7%AB%A0-orange.svg" alt="精选文章"> | ||
</a> | ||
<a href="#技术交流群"> | ||
<img src="https://img.shields.io/badge/Chat-%E5%8A%A0%E7%BE%A4%E4%BA%A4%E6%B5%81-brightgreen.svg" alt="技术交流群"> | ||
</a> | ||
<a href="https://segmentfault.com/u/tanrigongyibing"> | ||
<img src="https://img.shields.io/badge/Follow-%E6%80%9D%E5%90%A6-green.svg" alt="思否"> | ||
</a> | ||
<a href="https://juejin.im/user/5d072f9b5188257de35fd756"> | ||
<img src="https://img.shields.io/badge/Follow-%E6%8E%98%E9%87%91-blue.svg" alt="掘金"> | ||
</a> | ||
<a href="#开车"> | ||
<img src="https://img.shields.io/badge/Happy-%E5%BC%80%E8%BD%A6-yellow.svg" alt="开车"> | ||
</a> | ||
</p> | ||
--- | ||
|
||
|
||
|
||
> 越发觉得有必要将过往文章和demo相关内容整合在一起,这样方便查找。这里收录所有我的公众号优质文章,整体以Java技术栈为主,目前内容体量还不大,很多知识点我还在不断总结和完善,会陆续整理到这里.... | ||
|
||
|
||
💗 希望这些整理可以帮到你💗 | ||
|
||
|
||
|
||
|
||
|
||
### 精选文章 | ||
|
||
|
||
|
||
#### Spring / Spring Boot + 周边 | ||
|
||
- [HttpMessageConverter转换原理解析](https://dayarch.top/p/spring-boot-messageconverter.html) | ||
- [轻松高效玩转DTO(Data Transfer Object)](轻松高效玩转DTO(Data Transfer Object)) | ||
- [Mybatis拦截器实现数据加密与解密](https://dayarch.top/p/mybatis-interceptor-encrypt-decrypt.html) | ||
- [Mybatis拦截器执行过程解析](https://mp.weixin.qq.com/s/YVl20QqUHTXMubr68wXR1A) | ||
- [不得不知的责任链设计模式](https://mp.weixin.qq.com/s/SqIkX01JwR6QXKTa6Kqp4Q) | ||
- [“犯罪心理”解读 Mybatis 拦截器](https://mp.weixin.qq.com/s/8ohtlnT1Z_O2q8I154Z3-g) | ||
- [预防XSS,这几招管用!](https://mp.weixin.qq.com/s/iK3SQjxx5dSfE0lIWyYqmA) | ||
- [面试还不知道BeanFactory和ApplicationContext的区别?](https://dayarch.top/p/difference-between-beanfactory-and-applicationcontext.html) | ||
- [Spring Bean生命周期之缘起](https://dayarch.top/p/spring-bean-lifecycle-creation.html) | ||
- [Spring Bean生命周期之缘尽](https://dayarch.top/p/spring-bean-lifecycle-destroy.html) | ||
- [Spring Aware 到底是什么?](https://dayarch.top/p/spring-aware.html) | ||
- [Spring Boot @ConfigurationProperties 注解最强使用详解](https://dayarch.top/p/spring-boot-configurationProperties-usage.html) | ||
- [@Conditional注解,Spring Boot 的灵活配置](https://dayarch.top/p/spring-boot-condition-annotation.html) | ||
- [Shiro—小而美的安全框架](https://dayarch.top/p/shiro-in-practice.html) | ||
- [Springboot返回统一JSON数据格式是怎么实现的?](https://dayarch.top/p/spring-boot-global-return.html) | ||
- [SpringBoot统一异常处理及剖析](https://dayarch.top/p/spring-boot-global-exception.html) | ||
- [EasyExcel读取Excel实际应用](https://dayarch.top/p/easyexcel-read.html) | ||
- [Spring Boot 自定义starter 全面教程](https://dayarch.top/p/spring-boot-starter-custom.html) | ||
- [Lombok 使用教程详解](https://dayarch.top/p/lombok-usage.html) | ||
- [Spring 数据绑定剖析](https://dayarch.top/p/spring-data-binding-mechanism.html) | ||
- [在Spring Boot启动时执行代码的几种方法](https://dayarch.top/p/spring-boot-execute-on-startup.html) | ||
- 陆续整理中...... | ||
|
||
|
||
|
||
|
||
|
||
#### 并发编程 | ||
|
||
- [并发编程之初探](https://dayarch.top/p/java-concurrency-metaphor.html) | ||
|
||
- [并发编程三大核心](https://dayarch.top/p/java-concurrency-core.html) | ||
|
||
- [并发编程三大问题](https://dayarch.top/p/java-concurrency-three-questions.html) | ||
|
||
- [有序性可见性,Happens-before来搞定](https://dayarch.top/p/java-concurrency-happens-before-rule.html) | ||
|
||
- [解决原子性问题?你首先需要的是宏观理解](https://dayarch.top/p/java-concurrency-atomic.html) | ||
|
||
- [面试volatile关键字时,我们应该具备哪些谈资?](https://dayarch.top/p/java-concurrency-volatile.html) | ||
|
||
- [锁保护资源,synchronized方法就够了吗](https://dayarch.top/p/java-concurrency-lock-resource.html) | ||
|
||
- [Java并发死锁解决思路](https://dayarch.top/p/java-concurrency-dead-lock.html) | ||
|
||
- 正在疯狂更新中...... | ||
|
||
|
||
|
||
|
||
|
||
#### 面试常见 | ||
|
||
- [Java equals 和 hashCode 面试那点事](https://dayarch.top/p/java-equals-hashcode.html) | ||
- [Maven 依赖传递性透彻理解](https://dayarch.top/p/maven-dependency-optional-transitive.html) | ||
- [双亲委派模型,大厂高频面试题,轻松搞定](https://dayarch.top/p/java-parents-delegation-model.html) | ||
- [红黑树,史上最强动静图详解](https://dayarch.top/p/redblack-tree.html) | ||
- [Java String基础面试](https://dayarch.top/p/java-string-interview.html) | ||
- [Java12 Collectors.teeing 的使用详解](https://dayarch.top/p/jdk12-collectors-teeing-api-usage.html) | ||
- [如何设计好的Restful API](https://dayarch.top/p/restful-api-design.html) | ||
- 陆续整理中...... | ||
|
||
|
||
|
||
|
||
|
||
#### 高效工作应用/工具篇 | ||
|
||
- [SDKMAN 统一灵活管理多版本Java](https://dayarch.top/p/multiple-java-management.html) | ||
- [IntelliJ IDEA HTTP Client高级使用详解](https://dayarch.top/p/http-client-advanced-usage.html) | ||
- [小小TODO也有大道理](https://dayarch.top/p/how-to-use-todo-feature.html) | ||
- [只会用 git pull ?有时候你可以尝试更优雅的处理方式](https://mp.weixin.qq.com/s/6dg3u2PkcTSQHu_3T_QYnA) | ||
|
||
|
||
|
||
|
||
|
||
#### 总结/感悟 | ||
|
||
## | ||
|
||
- [程序猿为什么要看源码](https://mp.weixin.qq.com/s/V7h8O6pVFQ-nr_iA2SNqtw) | ||
- [2019归零,2020走你](https://dayarch.top/p/2019-summary.html) | ||
- [读《Clean Code 代码整洁之道》之感悟](https://dayarch.top/p/book-reviews-clean-code.html) | ||
|
||
|
||
|
||
|
||
|
||
#### 数据库相关 | ||
|
||
- [跨表更新,看到自己写的SQL像个憨憨](https://dayarch.top/p/mysql-cross-table-update.html) | ||
- [MySQL group_concat 函数详解](https://dayarch.top/p/mysql-group-concat-function-usage.html) | ||
|
||
|
||
|
||
|
||
|
||
#### 其他高质量技术文章 | ||
|
||
如果你阅读到了某些高质量技术文章,经原作者同意,通过点击下面微信链接加我好友备注「优秀」,提供文章信息, 我会整理在此处,**文章版权归原作者所有** | ||
|
||
<p><a href="#技术交流群"> | ||
<img src="https://img.shields.io/badge/Chat-%E5%8A%A0%E6%88%91%E5%BE%AE%E4%BF%A1-blue.svg" alt="技术交流群"> | ||
</a></p> | ||
|
||
|
||
--- | ||
|
||
|
||
|
||
### 公众号 | ||
|
||
- 🧮技术干货在这里 | ||
- 🔧高效工具汇总 | ||
- 🧱项目实战技巧 | ||
- 📚珍藏资料,助你起飞🛫️ | ||
|
||
|
||
|
||
![](https://cdn.jsdelivr.net/gh/FraserYu/img-host/blog-imgqr.png) | ||
|
||
|
||
|
||
|
||
|
||
--- | ||
|
||
|
||
|
||
|
||
|
||
### | ||
|
||
### 技术交流群 | ||
|
||
你看我微信头像就知道我有多单纯🌹,我们的关系马上就要更进一步了💋,加我微信备注「进群」加入技术交流群,这里汇聚全国各地的温柔的武林高手,请回看Slogan1,希望你在这里得到成长的同时也可以帮助别人成长 | ||
|
||
|
||
|
||
**🈲️:** 营销/广告/推广/私加好友 | ||
|
||
|
||
|
||
加我好友后别着急,我会尽量快速拉大家入群的,因为白天我也是要混饭吃的...... | ||
|
||
|
||
|
||
![](https://cdn.jsdelivr.net/gh/FraserYu/img-host/blog-imgWechatIMG124.jpeg) | ||
|
||
|
||
|
||
|
||
|
||
--- | ||
|
||
### | ||
|
||
### 推广 | ||
|
||
🎁我在推广云服务器,如果你正好需要,这里的价格绝对让你满意,没事就是要折腾,如果你也想赞助支持,请微信联系我 | ||
|
||
<p> | ||
<a href="https://www.aliyun.com/minisite/goods?userCode=d4nba2y2" title="阿里云" rel="external nofollow noopener noreferrer" target="_blank"> | ||
<img src="https://cdn.jsdelivr.net/gh/FraserYu/img-host/blog-imgaliyun300x90.jpg" width="269"> | ||
</a> | ||
</p> | ||
<p> | ||
<a href="https://url.cn/5B5MNZY" title="阿里云" rel="external nofollow noopener noreferrer" target="_blank"> | ||
<img src="https://cdn.jsdelivr.net/gh/FraserYu/img-host/blog-imgtengxunyun.jpg" width="269"> | ||
</a> | ||
</p> | ||
|
||
|
||
|
||
📓**点击图标访问其他平台博客(欢迎关注)** | ||
|
||
<div> | ||
<span> | ||
<a href="https://segmentfault.com/u/tanrigongyibing" title="思否" rel="external nofollow" target="_blank"><img src="https://cdn.jsdelivr.net/gh/FraserYu/img-host/blog-imgsf1.png" width="30"> | ||
</a> | ||
</span> | ||
<span> | ||
<a href="https://juejin.im/user/5d072f9b5188257de35fd756" title="掘金" rel="external nofollow" target="_blank"><img src="https://cdn.jsdelivr.net/gh/FraserYu/img-host/blog-imgjuejin.png" width="30"> | ||
</a> | ||
</span> | ||
<span> | ||
<a href="https://www.jianshu.com/u/9f9cb4189453" title="简书" rel="external nofollow" target="_blank"><img src="https://cdn.jsdelivr.net/gh/FraserYu/img-host/blog-imgjianshu.png" width="30"> | ||
</a> | ||
</span> | ||
<span> | ||
<a href="https://blog.csdn.net/yusimiao" title="CSDN" rel="external nofollow" target="_blank"><img src="https://cdn.jsdelivr.net/gh/FraserYu/img-host/blog-imgcsdn.svg" width="30"> | ||
</a> | ||
</span> | ||
<span> | ||
<a href="https://www.zhihu.com/people/claus-yu/activities" title="知乎" rel="external nofollow" target="_blank"><img src="https://cdn.jsdelivr.net/gh/FraserYu/img-host/blog-imgzhihu.png" width="30"> | ||
</a> | ||
</span> | ||
<span> | ||
<a href="https://www.toutiao.com/c/user/103333527519/#mid=1637550143042563" title="头条" rel="external nofollow" target="_blank"><img src="https://cdn.jsdelivr.net/gh/FraserYu/img-host/blog-imgtoutiao.png" width="30"> | ||
</a> | ||
</span> | ||
<span> | ||
<a href="https://my.oschina.net/u/4149877" title="开源中国" rel="external nofollow" target="_blank"><img src="https://cdn.jsdelivr.net/gh/FraserYu/img-host/blog-imgosc.png" width="30"> | ||
</a> | ||
</span> | ||
</div> | ||
--- | ||
|
||
|
||
|
||
### 开车 | ||
|
||
我们关系刚开始,上来就要开车?客官你太着急了 | ||
|
||
![](https://cdn.jsdelivr.net/gh/FraserYu/img-host/blog-img20200207170937.png) | ||
|
||
|
||
|
||
|
||
|
||
> 技术文章首发于我的[个人博客](https://dayarch.top)和公众号「日拱一兵」 | ||
|
||
以读侦探小说思维轻松趣味学习 Java 技术栈相关知识,本着将复杂问题简单化,抽象问题具体化和图形化原则逐步分解技术问题,技术持续更新,请持续关注...... | ||
|
||
|
||
![](https://rgyb.sunluomeng.top/%E5%85%AC%E4%BC%97%E8%B4%A6%E5%8F%B7%E6%96%87%E7%AB%A0/%E6%84%9F%E6%83%B3%E4%B8%8E%E6%80%BB%E7%BB%93/_image/2019-07-25/taidu%20%281%29.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 14 additions & 4 deletions
18
concurrency/src/main/java/com/example/concurrency/accountbook/AccountBookManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,31 @@ | ||
package com.example.concurrency.accountbook; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
/** | ||
* 账户管理员 | ||
* | ||
* @author fraser | ||
* @date 2019/10/18 11:24 AM | ||
*/ | ||
public class AccountBookManager { | ||
|
||
List<Object> accounts = new ArrayList<>(2); | ||
|
||
synchronized boolean getAllRequiredAccountBook( Object from, Object to){ | ||
if(拿到所有账本){ | ||
return true; | ||
} else{ | ||
if(accounts.contains(from) || accounts.contains(to)){ | ||
return false; | ||
} else{ | ||
accounts.add(from); | ||
accounts.add(to); | ||
|
||
return true; | ||
} | ||
} | ||
// 归还资源 | ||
synchronized void releaseObtainedAccountBook(Object from, Object to){ | ||
归还获取到的账本 | ||
accounts.remove(from); | ||
accounts.remove(to); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters