Accumulate some interesting topics and learn knowledge points
topic
1. How do entity objects perform state migration in Hibernate?
3 states that must be remembered
Transient state (new, or transient), persistent state (managed, or persistent), free state (detached) and removed state (removed, there is no removed state among the three states defined in the previous Hibernate documentation)
save persistence becomes persistent too,
2. What is the N+1 problem of Hibernate and how to solve it?
one more time when querying
n+1 principle explanation and solution
http://www.blogjava.net/RoyPayne/archive/2012/01/30/369017.html
3. What is the mechanism of Hibernate lazy loading and how does it work?
cglib agent loads, executes sql query
http://blog.csdn.net/xc635960736/article/details/7049863
http://superleo.iteye.com/blog/243322
4. How to do Hibernate cascade save?
Setting cascade
5.What is the difference between the second level cache and the first level cache of Hibernate?
1session 2Other caching frameworks such as ehcache, the session cache cannot be separated from the session
6. About 3 types of read problems, 2 types of update problems and database lock principles in spring
http://www.iteye.com/topic/1124043
7. The difference between get and post
- get is to get data from the server, and post is to send data to the server.
- On the client side, the Get method submits the data through the URL, and the data can be seen in the URL; the POST method, the data is placed in the HTML HEADER and submitted.
- The data submitted by GET method can only have a maximum of 2k bytes, while POST does not have this limit.
8. When does spring use require_new
9. High performance mysql
10. Delete duplicate records in database table
http://www.cnblogs.com/ggzwtj/archive/2012/04/11/2441724.html
15.如何判断链表是否有环的存在
答:
判断链表是否存在环,办法为:
设置两个指针(fast, slow),初始值都指向头,slow每次前进一步,fast每次前进二步,如果链表存在环,则fast必定先进入环,而slow后进入环,两个指针必定相遇。(当然,fast先行头到尾部为NULL,则为无环链表)程序如下:
{
slist *slow = head, *fast = head;
while ( fast && fast->next )
{
slow = slow->next;
fast = fast->next->next; if ( slow == fast ) break; } return !(fast == NULL || fast->next == NULL);}
answer:
Possible reason one:
When the jar has source code and comments, and the jar 's api is referenced , the parameters will display meaningful names, and comments can also be displayed
当jar包没有源码时,在生成class文件时,注释会被去掉,方法参数的命名会被简单替换再也没有提示了,所以掉用api时就会出现:既没有注释,方法参数的命名也是param1这种没意义的命名方式
可能原因二:
eclipse安装了代码混淆工具,所以api的变量名被打乱,无法显示有意义的变量名
(在APS的开发环境,可能是这张情况引起的)