小任班长 发布的文章

mybatis开启缓存
MyBatis的缓存分为一级缓存和二级缓存(全局缓存) ,缓存示意图如下图所示。默认情况下,一级缓存是开启的,且不能被关闭。
一次数据库 SqlSession会话中,执行多次查询条件完全相同的SQL,MyBatis提供了一级缓存的方案优化这部分场景,如果是相同的SQL语句,会优先命中一级缓存,避免直接对数据库进行查询,提高性能。

二级缓存(全局缓存)开启后,同一个namespace下的所有操作语句,都影响着同一个Cache,即二级缓存被多个SqlSession共享,是一个全局的变量。
当开启缓存后,数据的查询执行的流程就是 二级缓存 -> 一级缓存 -> 数据库。

mybatis 一级二级缓存

nginx

使用try_files属性

location / {
  root   /app/web;
  try_files $uri $uri/ @router; #检测文件是否存在不存在则重定向到首页目录    防止404
  index  index.html index.htm;
  #proxy_set_header        Host $host;
  #nginx非80端口处理 加上 :$server_port
   client_max_body_size 10m;
   client_body_buffer_size 128k;
}
location @router {
   rewrite ^.*$ /index.html last;
}

在项目的子路由下刷新页面出现了404,这是因为刷新页面时访问的资源在服务端找不到,因为vue-router设置的路径不是真实存在的路径。
当用户请求 http://localhost/example 时,这里的 $uri 就是 /example。
try_files 会到硬盘里尝试找这个文件。如果存在名为 /$root/example(其中 $root 是项目代码安装目录)的文件,就直接把这个文件的内容发送给用户。

微信8.0.17内测版

微信8.0.17

测试发现,支持发送消息有动画效果,大家可以体验下。
若想还原到旧版本,官方下载即可,聊天记录啥的不会丢失。

下载链接:

1.微信内测版本最新体验地址(微信中打开下方链接)
http://support.weixin.qq.com/cgi-bin/mmsupport-bin/readtemplate?t=page/android_exp__index
建议,收藏到微信中,这样下次随时打开,下载最新体验安装包。

微信内测android版本体验地址及常见问题

http://www.cnxiaocheng.top/2018/12/28/%E5%BE%AE%E4%BF%A1%E5%86%85%E6%B5%8B%E5%9C%B0%E5%9D%80.html

President Xi Jinping held a video meeting with US President Biden on the morning of November 16. The two sides conducted full and in-depth communication and exchanges on strategic, overall, and fundamental issues related to the development of Sino-US relations, as well as important issues of common concern.

Taiwan independence

Xi Jinping expounded China's principled position on the Taiwan issue. Xi Jinping emphasized that the situation in the Taiwan Strait is facing a new round of tension because the Taiwan authorities have repeatedly attempted to "rely on the United States for independence," and some people in the United States intend to "use Taiwan to control China." This trend is very dangerous. It is playing with fire, and playing with fire must burn oneself. The one-China principle and the three Sino-US joint communiqués are the political foundation of Sino-US relations. Successive U.S. governments have made clear commitments to this. The true status quo of the Taiwan issue and the core content of one China are: there is only one China in the world, Taiwan is a part of China, and the government of the People's Republic of China is the sole legal government representing China. The complete reunification of China is the common aspiration of all Chinese people. We are patient and we are willing to use our utmost sincerity and do our utmost to strive for the prospect of peaceful reunification. However, if the "Taiwan independence" separatist forces provoke persecution, or even break through the red line, we will have to take decisive measures.

Biden said that the US-China relationship is the most important bilateral relationship in the world. As two world powers, the United States and China have responsibilities to both the United States and China and the people of the world. The two sides should increase their understanding of each other's intentions through open and frank dialogue, and ensure that the competition between the two countries is fair and healthy, and will not evolve into conflict. I agree with President Xi Jinping's statement that history is fair, and US-China relations can only be done well, not messed up. China was already a big country more than 5,000 years ago. I would like to reiterate clearly that the United States does not seek to change China’s system, does not seek to strengthen alliances against China, and has no intention of conflict with China. The US government is committed to pursuing the long-term consistent one-China policy, does not support "Taiwan independence," and hopes that the Taiwan Strait will maintain peace and stability. The United States is willing to work with China to respect each other, coexist peacefully, strengthen communication, reduce misunderstandings, properly handle differences in a constructive way, strengthen cooperation in areas where the interests of the United States and China are the same, and jointly respond to global challenges such as new crown pneumonia and climate change. The people of the country can live a better life. Our younger generation should be encouraged to get in touch with each other more and understand each other's cultures, so as to make the world a better place.

The two sides also exchanged views on Afghanistan, the Iranian nuclear issue and the situation on the Korean Peninsula and other international and regional issues of common concern.

The capitals of the two countries believe that the meeting was frank, constructive, substantive, and fruitful, which is conducive to enhancing mutual understanding between the two sides, increasing the positive expectations of the international community on Sino-US relations, and sending a strong message to China, the United States and the world. Strong signal. The two sides agreed to continue to maintain close ties through various means to push China-U.S. relations back on the right track of healthy and stable development, and benefit the peoples of China and the U.S. and the peoples of the world.

Xi Jinping: China and the United States should respect each other, coexist peacefully, and cooperate for a win-win situation

US President Biden in Beijing on the morning

Xi Jinping pointed out that at present, China and the United States are at a critical stage of development, and the "global village" of mankind is also facing many challenges. As the world's top two economies and permanent members of the UN Security Council, China and the United States should strengthen communication and cooperation, not only handle our respective domestic affairs, but also shoulder our due international responsibilities, and jointly promote the noble cause of peace and development of mankind. This is the common vision of China and the United States and the people of all countries in the world, and it is also the common mission of the leaders of China and the United States.

Xi Jinping emphasized that to promote the development of China and the United States, maintain a peaceful and stable international environment, and effectively respond to global challenges such as climate change and the new crown pneumonia epidemic, all require a healthy and stable Sino-US relationship. China and the United States should respect each other, coexist peacefully, and cooperate for a win-win situation. I would like to work with Mr. President to form a consensus and take positive actions to lead the positive development of Sino-US relations. This is the need for the benefit of the people of the two countries and the expectation of the international community.

免责声明
本博客部分内容来自于互联网,不代表作者的观点和立场,如若侵犯到您的权益,请联系[email protected]。我们会在24小时内进行删除。