当前位置:网站首页>2020-10_ Development experience set
2020-10_ Development experience set
2022-07-03 12:16:00 【jackaroo2020】
1. java 1.7 New specification , You can underline the value , To enhance readability .
- You cannot underline values before and after
- You cannot underline around the decimal point
- You cannot underline multiple consecutive non numeric numbers
2. What is? CAS Mechanism ?
CAS(Compare and Swap) Compare and replace ,CAS The mechanism uses 3 Basic operands : Memory address V, Old expectations A, New value to modify B.
When updating a variable , Only when the expected value of the variable A And memory address V When the actual values are the same , The memory address V The corresponding value is modified to B.
CAS The shortcomings of :
- CPU Spending too much
In the case of high concurrency , If many threads repeatedly try to update a variable , But it has not been updated successfully , cycle , Will give CPU Bring a lot of pressure . - There's no guarantee that the code block is atomic
CAS What the mechanism guarantees is only the atomic operation of a variable , It doesn't guarantee the atomicity of the whole code block . For example, guarantee is needed 3 All variables are updated atomically , You have to use it synchronized 了 . - ABA problem
3. Maven How to configure HTTP agent
In enterprise development , Many companies will use Intranet in consideration of network security , Some small partners who have just arrived at the company will find after installing the environment , Because you can't connect to the Internet Maven Can't get down from the library , This is the time when Maven Intermediate configuration agent .
The specific operation steps are as follows :
1. Open the download Maven File in conf Folder , find settings.xml file
2. open settings.xml file , find label , Paste the following code
<proxy>
<!--id The name of the agent ( Set casually )-->
<id>optional</id>
<!--true It means effective -->
<active>true</active>
<!-- agreement -->
<protocol>http</protocol>
<!-- Internet user name and password of this machine , without , Please comment or delete -->
<username>*******.ex</username>
<password>a*169646</password>
<!-- The company uses the Internet ip And port , I.e. agency , Replace here with the corresponding ip And port -->
<host>127.0.0.1</host>
<port>11171</port>
<!-- Fill in the address without agency , With vertical lines | Split multiple addresses , Usually fill in local Maven Warehouse address -->
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>
4. annotation @JsonUnwrapped Flatten the object
Reference article :https://blog.csdn.net/tangyaya8/article/details/101513670
5. Spring in propagation Of 7 Transaction configurations
In declarative transactions , To configure a section , It uses propagation, Indicates how you intend to use transactions for these methods , Use it or not , among propagation There are seven configurations ,REQUIRED、SUPPORTS、MANDATORY、REQUIRES_NEW、NOT_SUPPORTED、NEVER、NESTED. The default is REQUIRED.
- REQUIRED: Support current transaction , If there is no current transaction , Just create a new transaction . This is the most common choice .
- SUPPORTS: Support current transaction , If there is no current transaction , Just in a non transactional way .
6. spring Of RestTemplate Use guide
Reference article :https://www.cnblogs.com/wyq178/p/9058030.html
7. Plug ins and tools
- Browser background plugin :DarkReader
- Vertica database (TODO)
- Kafka middleware (TODO)
- Kubectl Use summary (TODO)
8. word
- stain Stain
- acne acne
- mask masks
- scar Scars
- dimple Dimple
- wrinkle Wrinkle
- pouch Bag
- retrieval data retrieval
边栏推荐
- Colleagues wrote a responsibility chain model, with countless bugs
- DEJA_VU3D - Cesium功能集 之 053-地下模式效果
- (construction notes) learn the specific technology of how to design reusable software entities from three levels: class, API and framework
- DEJA_ Vu3d - 054 of cesium feature set - simulate the whole process of rocket launch
- 023 ([template] minimum spanning tree) (minimum spanning tree)
- php 获取文件夹下面的文件列表和文件夹列表
- 111. Minimum depth of binary tree
- init. RC service failed to start
- QT OpenGL rotate, pan, zoom
- Shutter widget: centerslice attribute
猜你喜欢
Why can't my MySQL container start
Unity3d learning notes 5 - create sub mesh
ArcGIS application (XXI) ArcMap method of deleting layer specified features
During FTP login, the error "530 login incorrect.login failed" is reported
Shutter: overview of shutter architecture (excerpt)
Niuniu's team competition
PHP导出word方法(一mht)
Introduction to the implementation principle of rxjs observable filter operator
QT OpenGL rotate, pan, zoom
PHP導出word方法(一mht)
随机推荐
Socket TCP for network communication (I)
Flutter 退出登录二次确认怎么做才更优雅?
Colleagues wrote a responsibility chain model, with countless bugs
网络通讯之Socket-Tcp(一)
抓包整理外篇fiddler———— 会话栏与过滤器[二]
【mysql官方文档】死锁
Quantitative calculation research
SLF4J 日志门面
DEJA_ Vu3d - 054 of cesium feature set - simulate the whole process of rocket launch
[official MySQL document] deadlock
How to deploy web pages to Alibaba cloud
Experience container in libvirt
[combinatorics] permutation and combination (summary of permutation and combination content | selection problem | set permutation | set combination)
JVM内存模型
Develop plug-ins for idea
Introduction to concurrent programming (II)
Wechat applet - basic content
How to convert a numeric string to an integer
Basic knowledge of OpenGL (sort it out according to your own understanding)
Pragma pack syntax and usage