Absrtact: Original Creation Place: www.bysocket.com Mason bysocket Hope reprint, keep abstract, thank you!
Before you become a leader, success is only related to your own growth.
When you become a leader, success is related to the growth of others.
1. Talk about concurrent insertions & codes
Scenario : Some of the ERP third parties in the business call this interface, resulting in multiple sets of identical packets calling the same plug-in interface. is generally xxxparamlist, a bulk INSERT interface.
First of all to talk about bulk insert code, usually do this, pseudo-code
for (Xxxparam xxx:xxxparamlist)
Validationxxxparam (XXX);
Xxxdao.batchinsert (Xxxparamlist)
A. Front-end – gray button
Is the time of submission control, not repeating the form or Ajax.
B. Back end – Distributed lock
Distributed lock information last shared: Portal--
Http://www.cnblogs.com/PurpleDream/p/5559352.html
C. Database –uk
Set SQL UNIQUE constraints when designing in database-built tables: Portal--
Http://www.w3school.com.cn/sql/sql_unique.asp
2. Keep talking about database field design
Tip 1 JSON text field with relational table
Scenarios: such as Product Details page, white Apple, golden apple ... The corresponding picture is displayed. This is for goods inch a record, recording that there is a field is sku_image:
goodsid {["White": "url"],["Gold": "url"]}
And the text field is incorrect. The size should be agreed, such as VARCHAR (1000).
Why is it? In fact, each get is traffic, converted into a traffic direction, that is, bandwidth, large-volume segment if the high traffic high concurrency situation, easy to cause the query volume is too big, will cause the gateway over the bandwidth.
Sometimes log on to the online database PM, forget the field of a table, but only know a table. That's what I do. Replace DESC table_name or SHOW CREATE table Table_name,sql is simple
SELECT * from XXX WHERE 1 LIMIT 1;
Directly can see the column name, modify the next where the conditions in the query you want to query.
3.grep Command
The general log is used to query the log center, but more often, a single machine will run to the server directly to find the log related to their own.
I was like, to find something unusual xxxexception
Cat xxx.log grep ' xxxexception '
It then displays the next few lines of the row, using the-c parameter to output the 4 rows of the matching row
Cat xxx.log grep ' xxxexception '-C 4
grep Small command detailed: Portal
Https://linux.cn/article-5453-1.html
4.Maven Skeleton Engineering
Come to the company and find small items one after another on the ground. To say it reminds me of the former owner's skeleton project.
It's easy to generate HelloWorld projects, and Xxxarchetype is the estimate engineering dependency that I developed. Generate Skeleton Project Key code:
MVN archetype:generate-dgroupid=com.tt-dartifactid=helloworld-darchetypegroupid=com.tt-darchetypeartifactid=com . TT. Xxxarchetype-darchetypeversion=0.0.1-snapshot-dinteractivemode=false
Detailed tutorials, portal-
Http://www.voidcn.com/blog/aosica321/article/p-5764716.html
5.DO BO Mutual Transfer Tool
This is usually the code generator, and Java configuration items. Interaction between the two business model:
Mapstruct (highest efficiency), Orika (fastest), dozer (multi-use)
Detailed tutorials, portal
Http://www.tianshouzhi.com/api/tutorials/mapstruct
http://blog.csdn.net/a258831020/article/details/48247187
If the above article or link is helpful to you, don't forget to comment at the end of the article AH ~ You can also click on the right side of the page "share" hover button oh, let more people read this article.
AB Apachebench BST C + + collections Cookie Date DDL DML Ehcache fast-framework Git HTTP IO Java java8 java ee JSON JVM Maven MVC Properties Quartz Redis REST servletspring Spring Boot SQL time Token Tomcat Transaction Web security Transaction Two Fork search Tree two fork tree status code design mode Essays Collection
Java Web Work Tips Summary 16.10