平安网吧

talk is cheap,soldier~


  • 首页

  • 标签

  • 分类

  • 归档

  • 搜索

注解与反射

发表于 2020-11-25 | 分类于 后端方向 |
字数统计: 7,918 | 阅读时长 ≈ 32

注解&反射

为什么要学习注解与反射?

注解与反射作为Java语言特性的后半程的高级部分,学习曲线是比较陡峭的。但它又是Java初学者必须跨越的门槛。因为在当下Java的市场,技术选型中的SSM占据着大部分份额。而Spring中两大核心内容的Ioc容器与AOP、MyBatis的ORM,它们的底层实现都是由注解与反射所构建的。若注解反射掌握的不好,很难去真正理解框架的本质,也就自然很难脱离他人的协助去很好的借助框架编写项目。可以说,学不好递归,就与掌握非线性数据结构无缘。学不好注解反射,就与掌握Java框架无缘。

学习之前

注解是建立在Java的发射机制上的特性。所以要弄懂注解,就要先弄懂反射,要弄懂反射,就要先弄懂类加载的过程。本文三点都会提及,并不需要自上而下的阅读。

光看并不利于理解,一定要跟着敲。不断地模仿、探索和反思是绝大多数人学习的方式,而不断地积累才会让你有这个能力去灵光一现。过渡妖魔化智力只会让你一事无成。

阅读全文 »

浅析 URL

发表于 2020-02-26 | 分类于 计算机原理方向 |
字数统计: 372 | 阅读时长 ≈ 1

1.URL包含哪几部分,每部分分别起什么作用

URL = protocol + port + path + queryString + anchor

统一资源定位 = 协议 + 域名或IP + 端口 + 路径 + 传讯字符串 + 锚点

协议: 它是一种规则,约定。为进行网络中的数据交换而建立的规则,约定。用于不同系统中实体间的通信。

IP: 网际互连协议,HTTP协议是属于TCP/IP协议簇的,它可以帮助我们定位一台设备,以及如何封装数据报文,跟其他设备交流。

域名: 十进制的IP地址是难以去记忆的,我们需要更加语义化的东西,域名。它可以理解为IP的别称。一个域名可以对应不同的IP,一个IP可以对应不同的域名。

端口: 机器可以提供非常多的服务,每一个服务都有一个号码,这个号码叫端口。HTTP服务-> port:80 HTTPS-> port: 443 FTP -> port:21,共65535个端口。

路径/查询字符串/锚点:

请求不同的页面:使用路径

请求同一个页面,却不同的内容: 使用查询字符串

请求同一个页面,同一个内容,却是不同的位置: 使用锚点

锚点之和浏览器有关系,和服务器无关,会把它吞掉。

逐步细化


2.DNS 的作用是什么,nslookup 命令怎么用

域名系统(服务)协议,用于域名与 IP 地址的相互转换

多线程(synchronized&ConcurentHashMap)

发表于 2020-02-23 | 分类于 后端方向 |
字数统计: 1,926 | 阅读时长 ≈ 7

前言

上一次我们的多线程衍生到了锁的概念,由于在编写程序的过程涉及了部分非原子操作,这些操作会让程序在多线程的模型之下运行起来非常危险。而我们又如何使用相应的措施去避免危险呢。

  • synchronized三种用法
  • ConcurrentHashMap的线程同步机制
  • 知识拓展
阅读全文 »

多线程初探

发表于 2020-01-03 | 分类于 后端方向 |
字数统计: 1,899 | 阅读时长 ≈ 7

阅读全文 »

A man with the tool and his spirit

发表于 2019-11-09 | 分类于 English |
字数统计: 455 | 阅读时长 ≈ 3

        Since our father (I mean the ancestor) was coming to this land. A desperate situation for them, humans have been hunted by predators(these giant beasts), but they still alive. Why? Because they learned to stand as one and made the weapon against the predators. After that, there is no more enemy can fight with them when they discovered the fire and created the spear. In the end, our father conquests any land which they are crossing.
        Honestly, the beast has many body advantages. Felids have the supervision that they can be watching in the night, even without light. The panther can maintain high speed on the ground of about one hundred kilometers per hour. The crocodile has the most powerful bite in the world, crash prey’s bone that like chocolate. What a great gift they have! But just like the old saying, Gift also means curse. The night vision also brings myopia, and the super speed also brings the short-lived. The crocodile’s bite makes it a clumsy body to evade the crisis.
        What about humans? You may ask. Okay, everything in the human body is moderate, but we have the secret weapon, tool. The tool is the greatest invention in human history. We have gone through many crises and questions with the help of this friend. Okay, what’s the tool. You need it, it comes. You don’t need it, it leaves.
        But this is not enough if our human wants to keep our dominance in the earth. Because the tool is not the talent, it’s not from our body, and they could disappear. We are a weakness when we leave the tool. The spirit is the only advantage that we have to get through the challenge. Let me illustrate, The long march of the Red Army. It has not played a secondary role in human history. Contrary, it’s just as pivotal as the tool that we mentioned.
        We still cannot escape from the parameter of the biology,nomatter how great we claim to be. We can help someone, but also can hurt someone, the lion could be dangerous, but so what? Imagining the human’s war, the blade, the gun, the biochemistry weapon, the nuclear weapon…., thousand and millions of innocent people will die. Sometimes, we humans are our own worst nightmare. Will power could help us to overcome the despair when we have nothing and stop us from becoming a demon when we do the bad things, just like Adolf Hitler. Spirit is always there for us and telling. Who we are and what we should do as a human.
        唯有情深似海亦无边,任凭云散风吹去

ArrayList.java初探

发表于 2019-10-18 | 分类于 后端方向 |
字数统计: 2,182 | 阅读时长 ≈ 11

前言

妹有前言

阅读全文 »

Maven and Classpath Hell

发表于 2019-09-28 | 分类于 后端方向 |
字数统计: 2,258 | 阅读时长 ≈ 9

  • 前言

        之前其实一直在用到Maven,但却没有怎么下功夫了解。但了解Maven还是非常有必要的。我一直很认同ber哥的一句话。

强大的IDE会割裂你和这些底层的运作。但你还是要了解这些底层运行的原理,因为总会遇到各种各样的问题让你不得不和这些底层打交道,对于工程师来说,生疏的表现是不合适的。了解这些细节,有助于你解决问题。工作就是在解决各种各样的问题。

        通过了解Maven所为我们做的,我们可以更深刻的理解整个JAVA世界的历史变革,对我们现在使用的一切有一定认知性。虽然不能讲得很深,但也能大致对Maven有一个感性的认识了。

阅读全文 »

JAVA的装箱类型初探

发表于 2019-09-22 | 分类于 后端方向 |
字数统计: 2,125 | 阅读时长 ≈ 9

PS:三天后朱健迎来他的第一场面试,希望他能得到他想要的结果。好了不说他了,我们干我们的。

阅读全文 »

如何使用 GitHub Pages 预览 HTML

发表于 2019-09-20 | 分类于 前端方面 |
字数统计: 738 | 阅读时长 ≈ 3

梯子恢复后请重新选择github上的图床

阅读全文 »

Backstreet booooooooys

发表于 2019-09-09 |
字数统计: 30 | 阅读时长 ≈ 1

    It’s my honor to meet you, Backstreet boys.after all these years passed, you guys are still can be singing together. Just like the old-time, isn’t it?
123
dcc

dcc

记录一些方方面面的东西

22 日志
5 分类
17 标签
GitHub E-Mail
© 2020 dcc
本站访客数 本站总访问量