当前位置:网站首页>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
边栏推荐
- Introduction to concurrent programming (I)
- (database authorization - redis) summary of unauthorized access vulnerabilities in redis
- Simple factory and factory method mode
- Oracle advanced (I) realize DMP by expdp impdp command
- php 获取文件夹下面的文件列表和文件夹列表
- Dart: about Libraries
- Basic knowledge of OpenGL (sort it out according to your own understanding)
- Vulnhub's Nagini
- OpenGL 着色器使用
- 2.6 preliminary cognition of synergetic couroutines
猜你喜欢
随机推荐
win10 上PHP artisan storage:link 出现 symlink (): Protocol error的解决办法
"Jianzhi offer 04" two-dimensional array search
Integer int compare size
If you can't learn, you have to learn. Jetpack compose writes an im app (I)
Unity3d learning notes 5 - create sub mesh
[combinatorics] permutation and combination (summary of permutation and combination content | selection problem | set permutation | set combination)
Colleagues wrote a responsibility chain model, with countless bugs
111. Minimum depth of binary tree
DEJA_ Vu3d - 054 of cesium feature set - simulate the whole process of rocket launch
Apprendre à concevoir des entités logicielles réutilisables à partir de la classe, de l'API et du cadre
(construction notes) grasp learning experience
网络通讯之Socket-Tcp(一)
temp
[MySQL special] read lock and write lock
Basic knowledge of OpenGL (sort it out according to your own understanding)
Develop plug-ins for idea
Php Export word method (One MHT)
Wechat applet - basic content
(数据库提权——Redis)Redis未授权访问漏洞总结
LeetCode 0556.下一个更大元素 III - 4步讲完