Java Tips
贫血模型和领域模型部分,domain和entity的区别
BeanUtils.copyProperties是一个浅拷贝方法,那么深拷贝的方法是?
java部分,不同于go部分,做好接口的泛型部分,
如果做泛型的话,就可以将数据的一些转换部分,放置到entity本身,这样,可以形成一套domain部分
1 | // com.google.common.base.Convert |
**jsr 303 ** 验证
lombok
lombok的链式调用,使用 @Accessors(chain = true)
关于静态构造方法
1 | @Accessors(chain = true) |
builder模式
1 | @Builder |
同时,关于@Delegate部分
Kafka Rest Proxy
1 | # Produce a message using JSON with the value '{ "foo": "bar" }' to the topic jsontest |
Rest Proxy指的是,rest的接口进行producer以及consumer部分的操作?
REST Proxy Clusters and Load Balancing - The REST Proxy is designed to support multiple instances running together to spread load and can safely be run behind various load balancing mechanisms (e.g. round robin DNS, discovery services, load balancers) as long as instances are configured correctly.
loser
アイムアルーザー
我是个loser
どうせだったら
所以就算
远吠えだっていいだろう
虚张声势也无所谓吧
もう一回もう一回行こうぜ
再一次再一次前行吧
本周工作:
- 交接文档的编写,基本ok
- k8s的一些入门,在本地的minikube的启动部分
下周工作:
- 交接部分的讲解,一些查漏补缺
- 关于spring boot部分的重新拣起来
离职的工作,按部就班地进行,不过,关于新知识的储备方面,感觉还是有些偏慢,要加快一些速度,把本地的一些环境什么的,基本知识什么的重新学习起来。。。
loser,再一次前行,钱的事情,慢慢挤出来,慢慢地缓解一些压力,先把银行的还了。。。
果然还是捉摸不定,情绪上时好时坏,是自己太任性了,没有考虑别人的承受能力,一心地想当然,哎。。。或许自己当初的那个决定是错误的,还是希望,有个好的结果,这样起码状态上会有好些,至于自身,还是少些想当然吧,慢慢地承受,尽可能地照顾好别人,这样,别人在追求更好更舒适的环境,自己也稍微能心安理得一些,自己也没什么特别让人家眷恋的地方,人家完全有条件去获得更好的。。。还是当好一个acer,安安静静地就行了。。。
锻炼上,进一步加强,跑步上,维持在5’30的配速,进一步拉长跑步的时间,加油。。。
再一次前行!
Yaml Intro
can be hard to edit, for large files
It is difficult to see “where” in the file you are because it may be off the screen. You’ll need to scroll up, but then you need to keep track of the indentation, which can be pretty hard even with indentation guides, especially since 2-space indentation is the norm and tab indentation is forbidden2.
主要的几种配置文件格式:
The YAML spec is 23,449 words; for comparison, TOML is 3,339 words, JSON is 1,969 words, and XML is 20,603 words.
一些关于value的类型的解释
1 | python: 3.5.3 |
解释成为
{'python': '3.5.3', 'postgres': 9.3}
All of this – and more – is why many experienced YAMLers will often quote all strings, even when it’s not strictly required
不同语言解析上,可能yaml的解析规则上有所不同?
The reason for this is that there are multiple YAML documents in a single file (---
start the document). In Python there is the load_all()
function to parse all documents. Ruby’s load()
just loads the first document, and as near as I can tell, doesn’t have a way to load multiple documents.
Conclusion
并不是说yaml不好,只是指明yaml不能够更greater
可以尝试更好的方式,such as TOML