乱码解决大全
这里先写几个大家容易搞混的编码设置代码:
在jsp代码中的头部往往有这两行代码
pageEncoding是jsp文件本身的编码
contentType的charset是指服务器发送给客户端时的内容编码
JSP要经过两次的“编码”,第一阶段会用pageEncoding,第二阶段会用utf-8,第三阶段就是由Tomcat出来的网页, 用的是contentType。
如果pageEncoding属性存在,那么JSP页面的字符编码方式就由pageEncoding决定,
否则就由contentType属性中的charset决定,如果charset也不存在,JSP页面的字符编码方式就采用
默认的ISO-8859-1。
还有一种是在服务端接受参数的编码:
response和request的setCharacterEncoding 区别
request.setCharacterEncoding("utf-8");
response.setContentType("text/html;charset=utf-8");
request.setCharacterEncoding():是设置从request中取得的值或从数据库中取出的值。
指定后可以通过getParameter()则直接获得正确的字符串,如果不指定,则默认使用iso8859-1编码。值得注意的是在执行setCharacterEncoding()之前,不能执行任何getParameter()。而且,该指定只对POST方法有效,对GET方法无效。分析原因,应该是在执行第一个getParameter()的时候,java将会按照编码分析所有的提交内容,而后续的getParameter()不再进行分析,所以setCharacterEncoding()无效。而对于GET方法提交表单是,提交的内容在URL中,一开始就已经按照编码分析提交内容,setCharacterEncoding()自然就无效。
get需在Tomcat的server.xml中的:
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443"
URIEncoding="GBK" />
)加入URIEncoding="GBK",解决get请求乱码问题response.setContentType("text/html;charset=gb2312"):是设置页面中为中文编码。即以哪种编码返回给客户端。
前者是设置动态文字(参数,数据库),后者设置页面静态文字
response.setContentType指定 返回给客户端的编码,同时指定了浏览器显示的编码.
response.setCharacterEncoding设置HTTP 响应的编码,如果之前使用response.setContentType设置了编码格式,则使用response.setCharacterEncoding指定的编码格式覆盖之前的设置.与response.setContentType相同的是,调用此方法,必须在getWriter执行之前或者response被提交之前.
JSP和Servlet的六种中文乱码处理方法
一、表单提交时出现乱码:
在进行表单提交的时候,经常提交一些中文,自然就避免不了出现中文乱码的情况,对于表单来说有两种提交方式:get和post提交方式。所以请求的时候便有get请求和post请求。每种方式都有着不同的解决方法,之所以出现乱码,原因就在于get请求时,其传递给服务器的数据是附加在URL地址之后的;而post的请求时,其传递给服务器的数据是作为请求体的一部分传递给服务器。这也就导致了对它们所产生的乱码的处理方式是不同的。
1、客户端的get请求
get提交时, 容器以容器的编码 来编码 如果用的tomcat 默认的编码是iso-8859-1 在server.xml里面设置编码 或者
代码如下
1
2
|
String name = request.getPara...(
"name"
);
String strName =
new
String(name.getByte(
"iso-8859-1"
),
"GBK"
);
|
对于不同的请求方式,解决乱码的问题也是不一样的,对于客户端的get请求来说,服务器端处理要想不出现乱码,解决这个问题稍微复杂一些,需要用到String类型的构造函数,其中的一个构造函数就是用指定的编码方式去解码,一般都用“UTF-8”的方式。只要在服务器端将请求得到的参数重新构造成一个字符串就行了。
经过构造之后,客户端输入中文,且表单时get请求的情况下,str就变成了中文了。
2、客户端的post请求
对于客户端的post请求来说,处理乱码的问题就比较简单了,因为请求的数据时作为请求体的一部分传递给服务器的,所以只要修改请求内的编码就行了。只要在服务器端的最开始处将请求的数据设置为“UTF-8”就行了,输入如下语句:request. setCharacterEncoding(“UTF-8”);这样用户在服务器端获取到的中文数据就不再是乱码了。
二、超链接时出现乱码(低版本浏览器不行IE6)
在Web开发中,挺多的时候都是通过超链接去传递中文参数的,这也会导致在显示的时候也会出现乱码,对于超链接来说,它实际上是向服务器端发送了一个请求,而它发出的请求是属于get请求,所以对于超链接的乱码来说,它处理乱码的方式和表单的get请求出现乱码的方式是一样的。
三、重定向时出现乱码(低版本浏览器不行IE6)
有时写上response的sendRedirect方法进行重定向时也会出现乱码,重定向时实际上也是向服务器发送了一个请求,所以解决乱码的方法和和上面是一样的。
四、浏览器版本低导致的乱码
上网的时候,有时提交的一些信息在地址栏显示的是“%2C%C6%CC%C6”的字样,其实这都是防止出现乱码进行的解决方案,如果你的浏览器是IE6或以下版本,则我们的第二种情况和第三种情况会出现乱码(尤其是当中文是奇数的时候),这就不好使了所以我们必须采用另一种比较实际的作法:
在java.net包中提供了URLEncoder类和URLDcoder类,这两个类又分别提供了encode和decode两个静态方法,分别用于进行编码和解码。我们将要传递的中文参数进行编码之后,在传递给服务器,服务器解码之后,就可以显示中文了。
进行编码:URLEncoder.encode(stuname,”UTF-8”)
传递给服务器:<a href=”/1.jsp?stuname<%=stuname%>”>传递</a>
进行解码:URLDecoder.decode(stuname,”UTF-8”)
五、返回浏览器显示的乱码
在Servlet编程中,经常需要通过response对象将一些信息返回给浏览器,给我们的客户端,而我们在服务器端显示的中文,但是响应给客户端浏览器却是乱码,这主要是由于response对象的getWriter()方法返回的PrintWriter对象默认使用“ISO-8859-1”字符集编码进行Unicode字符串到字节数组的转换,由于ISO8859-1字符集中根本就没有包含中文字符,所以Java在进行转换的时候会将无效的字符编码输出给客户端,于是便出现了乱码,为此ServletResponse接口中便定义了setCharacterEncoding、setContentType等方法来指定getWriter方法返回的PrintWriter对象所使用的字符集编码,所以我们在写Servlet程序中,在调用getWriter方法之前设置这些方法的值。
只要编写Servlet文件中含有响应给客户端的信息,那么就要写上这两句话。最好写上第二句话,因为它的优先级高,它的设置结果将覆盖setContentType等方法设置的字符编码集。
六、修改Tomcat的编码
在get请求所导致乱码问题中,还有一种解决的方案,我们常用Tomcat作为运行Servlet和JSP的容器,而Tomcat内部默认的编码是ISO-8859-1,所以对于get请求方式,其传递的数据(URI)会附加在访问的资源后面,其编码是Tomcat默认的,如果修改该URI的编码,那么对于所有的get请求方式便不会出现乱码了包括上边说的重定向和超链接,在Tomcat的配置文件server.xml中找到修改Tomcat的端口的地方,在其内部加入URIEncoding属性,设置为和你的项目中所设的编码一样的值,这里全部都是UTF-8。
在编写Servlet和JSP的时候,为了避免出现乱码,最重要的就是:采用一致的编码,如果编码都一致了,肯定不会出现乱码。
<li class="tool-item tool-active is-like "><a href="javascript:;"><svg class="icon" aria-hidden="true"> <use xlink:href="#csdnc-thumbsup"></use> </svg><span class="name">点赞</span> <span class="count">1</span> </a></li> <li class="tool-item tool-active is-collection "><a href="javascript:;" data-report-click="{"mod":"popu_824"}"><svg class="icon" aria-hidden="true"> <use xlink:href="#icon-csdnc-Collection-G"></use> </svg><span class="name">收藏</span></a></li> <li class="tool-item tool-active is-share"><a href="javascript:;" data-report-click="{"mod":"1582594662_002"}"><svg class="icon" aria-hidden="true"> <use xlink:href="#icon-csdnc-fenxiang"></use> </svg>分享</a></li> <!--打赏开始--> <!--打赏结束--> <li class="tool-item tool-more"> <a> <svg t="1575545411852" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5717" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M179.176 499.222m-113.245 0a113.245 113.245 0 1 0 226.49 0 113.245 113.245 0 1 0-226.49 0Z" p-id="5718"></path><path d="M509.684 499.222m-113.245 0a113.245 113.245 0 1 0 226.49 0 113.245 113.245 0 1 0-226.49 0Z" p-id="5719"></path><path d="M846.175 499.222m-113.245 0a113.245 113.245 0 1 0 226.49 0 113.245 113.245 0 1 0-226.49 0Z" p-id="5720"></path></svg> </a> <ul class="more-box"> <li class="item"><a class="article-report">文章举报</a></li> </ul> </li> </ul> </div> </div> <div class="person-messagebox"> <div class="left-message"><a href="https://blog.csdn.net/u010662647"> <img src="https://profile.csdnimg.cn/0/1/6/3_u010662647" class="avatar_pic" username="u010662647"> <img src="https://g.csdnimg.cn/static/user-reg-year/1x/7.png" class="user-years"> </a></div> <div class="middle-message"> <div class="title"><span class="tit"><a href="https://blog.csdn.net/u010662647" data-report-click="{"mod":"popu_379"}" target="_blank">随风梦想</a></span> </div> <div class="text"><span>发布了4 篇原创文章</span> · <span>获赞 5</span> · <span>访问量 3万+</span></div> </div> <div class="right-message"> <a href="https://im.csdn.net/im/main.html?userName=u010662647" target="_blank" class="btn btn-sm btn-red-hollow bt-button personal-letter">私信 </a> <a class="btn btn-sm bt-button personal-watch" data-report-click="{"mod":"popu_379"}">关注</a> </div> </div> </div> </article>
<script>
$("#blog_detail_zk_collection").click(function(){
window.csdn.articleCollection()
})
<div class="recommend-box first-recommend-box"><div class="recommend-item-box type_blog clearfix">
<div class="content" style="width: 864px;">
<a href="https://blog.csdn.net/kt400_hhx/article/details/1641574" target="_blank" rel="noopener" title="jsp乱码解决大全" data-report-click="{"mod":"popu_387","index":"1","strategy":"OPENSEARCH","dest":"https:\/\/blog.csdn.net\/kt400_hhx\/article\/details\/1641574"}" data-report-query="depth_1-utm_source=distribute.pc_relevant.none-task-blog-OPENSEARCH-1&utm_source=distribute.pc_relevant.none-task-blog-OPENSEARCH-1">
<h4 class="text-truncate oneline" style="width: 704px;">
jsp<em>乱码</em><em>解决</em><em>大全</em> </h4>
<div class="info-box d-flex align-content-center">
<p class="date-and-readNum oneline">
<span class="date hover-show">06-07</span>
<span class="read-num hover-hide">
阅读数
2457</span>
</p>
</div>
</a>
<p class="content" style="width: 864px;">
<a href="https://blog.csdn.net/kt400_hhx/article/details/1641574" target="_blank" rel="noopener" title="jsp乱码解决大全">
<span class="desc oneline">jsp中文显示乱码解决方案2006-12-27 22:56一、JSP页面显示乱码二、表单提交中文时出现乱码三、数据库连接大家在JSP的开发过程中,经常出现中文乱码的问题,可能一至困扰着您,我现在把我在...</span>
</a>
<span class="blog_title_box oneline ">
<span class="type-show type-show-blog type-show-after">博文</span>
<a target="_blank" rel="noopener" href="https://blog.csdn.net/kt400_hhx">来自: <span class="blog_title"> kt400_hhx的专栏</span></a>
</span>
</p>
</div>
</div>
android中文乱码解决大全
07-14 阅读数 1623
http://blog.csdn.net/liaoci/article/details/7176268# android中文乱码解决大全分类: Android2012-01-04 20:31 5380... 博文 来自: 未来软件
tomcat字符集设置url中文乱码解决大全
11-27 阅读数 1610
tomcat字符集设置url中文乱码解决大全使用 tomcat 时,相信大家都回遇到中文乱码的问题,具体表现为通过表单取得的中文数据为乱码。一、初级解决方法 通过一番检索后,许多人采用了如下办法,首先... 博文 来自: shendeguang的专栏
idea各种中文显示乱码解决大全
08-18 阅读数 5万+
中文乱码问题分类:编码普通中文乱码 properties文件中文乱码 console控制台中文乱码 搜索框中文乱码 svn注释中文乱码问题截图:2、properties文件中文乱码4,、搜索框中文乱码... 博文 来自: liqimo1799的专栏
Mac下Mysql与navcat乱码解决大全
01-06 阅读数 276
mac下安装mysql,把以前的数据导入进来时发现中文全部乱码了,找各种原因与各种办法,可以汇总为以下几类:1、Mysql乱码2、Navcat乱码1、——Mysql乱码解决办法:在mysql的命令行控... 博文 来自: 夜猫子罗祥的博客
Qt 中文乱码解决大全
12-31 阅读数 7088
解决中文乱码,最好知道乱码是什么格式比如说:utf-8.解决方案:1.让整个应用程序支持中文: 在 QApplication a(argc, argv);后加上以下几句话即可。要包含头文件#inc... 博文 来自: xcy2011sky
jsp乱码解决大全(二)
01-21 阅读数 26
我的乱码之路——JSP与MySQL交互的中文乱码解决方案及总结 首先实现了一个StringConvert bean(GBtoISO()和ISOtoGB()两个方法),解决了与MySQL数据库... 博文 来自: 就算世界无童话
jsp乱码解决大全(转自csdn一高手)
04-22 阅读数 20
jsp中文显示乱码解决方案2006-12-27 22:56一、JSP页面显示乱码二、表单提交中文时出现乱码三、数据库连接大家在JSP的开发过程中,经常出现中文乱码的问题,可能一至困扰着您,我现在把我在... 博文 来自: 西风禅林
<div class="recommend-item-box blog-expert-recommend-box" style="display: block;">
<div class="d-flex">
<div class="blog-expert-recommend">
<div class="blog-expert">
<div class="blog-expert-flexbox" data-report-view="{"mod":"popu_709","dest":"https://blog.csdn.net/u010662647/article/details/79565715"}"><div class="blog-expert-item"><div class="blog-expert-info-box"><div class="blog-expert-img-box" data-report-click="{"mod":"popu_709","dest":"https://blog.csdn.net/u010662647/article/details/79565715"}"><a href="https://blog.csdn.net/kt400_hhx" target="_blank"><img src="https://profile.csdnimg.cn/C/C/8/3_kt400_hhx" username="kt400_hhx" alt="kt400_hhx" title="kt400_hhx"></a><span data-report-click="{"mod":"popu_710","dest":"https://blog.csdn.net/u010662647/article/details/79565715"}"><span class="blog-expert-button-follow btn-red-follow" data-name="kt400_hhx" data-nick="kt400_hhx">关注</span></span></div><div class="info"><span data-report-click="{"mod":"popu_709","dest":"https://blog.csdn.net/u010662647/article/details/79565715"}"><a href="https://blog.csdn.net/kt400_hhx" target="_blank"><h5 class="oneline" title="kt400_hhx">kt400_hhx</h5></a></span> <p></p><p class="article-num" title="60篇文章"> 60篇文章</p><p class="article-num" title="排名:千里之外"> 排名:千里之外</p><p></p></div></div></div><div class="blog-expert-item"><div class="blog-expert-info-box"><div class="blog-expert-img-box" data-report-click="{"mod":"popu_709","dest":"https://blog.csdn.net/u010662647/article/details/79565715"}"><a href="https://blog.csdn.net/susubuhui" target="_blank"><img src="https://profile.csdnimg.cn/0/B/8/3_susubuhui" username="susubuhui" alt="susubuhui" title="susubuhui"></a><span data-report-click="{"mod":"popu_710","dest":"https://blog.csdn.net/u010662647/article/details/79565715"}"><span class="blog-expert-button-follow btn-red-follow" data-name="susubuhui" data-nick="susubuhui">关注</span></span></div><div class="info"><span data-report-click="{"mod":"popu_709","dest":"https://blog.csdn.net/u010662647/article/details/79565715"}"><a href="https://blog.csdn.net/susubuhui" target="_blank"><h5 class="oneline" title="susubuhui">susubuhui</h5></a></span> <p></p><p class="article-num" title="538篇文章"> 538篇文章</p><p class="article-num" title="排名:3000+"> 排名:3000+</p><p></p></div></div></div><div class="blog-expert-item"><div class="blog-expert-info-box"><div class="blog-expert-img-box" data-report-click="{"mod":"popu_709","dest":"https://blog.csdn.net/u010662647/article/details/79565715"}"><a href="https://blog.csdn.net/shendeguang" target="_blank"><img src="https://profile.csdnimg.cn/7/C/1/3_shendeguang" username="shendeguang" alt="shendeguang" title="shendeguang"></a><span data-report-click="{"mod":"popu_710","dest":"https://blog.csdn.net/u010662647/article/details/79565715"}"><span class="blog-expert-button-follow btn-red-follow" data-name="shendeguang" data-nick="shendeguang">关注</span></span></div><div class="info"><span data-report-click="{"mod":"popu_709","dest":"https://blog.csdn.net/u010662647/article/details/79565715"}"><a href="https://blog.csdn.net/shendeguang" target="_blank"><h5 class="oneline" title="shendeguang">shendeguang</h5></a></span> <p></p><p class="article-num" title="373篇文章"> 373篇文章</p><p class="article-num" title="排名:9000+"> 排名:9000+</p><p></p></div></div></div><div class="blog-expert-item"><div class="blog-expert-info-box"><div class="blog-expert-img-box" data-report-click="{"mod":"popu_709","dest":"https://blog.csdn.net/u010662647/article/details/79565715"}"><a href="https://blog.csdn.net/qq1076376640" target="_blank"><img src="https://profile.csdnimg.cn/E/9/2/3_qq1076376640" username="qq1076376640" alt="柑橘&柑茶" title="柑橘&柑茶"></a><span data-report-click="{"mod":"popu_710","dest":"https://blog.csdn.net/u010662647/article/details/79565715"}"><span class="blog-expert-button-follow btn-red-follow" data-name="qq1076376640" data-nick="柑橘&柑茶">关注</span></span></div><div class="info"><span data-report-click="{"mod":"popu_709","dest":"https://blog.csdn.net/u010662647/article/details/79565715"}"><a href="https://blog.csdn.net/qq1076376640" target="_blank"><h5 class="oneline" title="柑橘&柑茶">柑橘&柑茶</h5></a></span> <p></p><p class="article-num" title="14篇文章"> 14篇文章</p><p class="article-num" title="排名:千里之外"> 排名:千里之外</p><p></p></div></div></div></div>
</div>
</div>
</div>
</div><div class="recommend-item-box baiduSearch recommend-box-ident" data-report-view="{"mod":"popu_387","dest":"https://blog.csdn.net/Allen_liyu/article/details/79508737","strategy":"searchFromBaidu1","index":"3"}" data-report-click="{"mod":"popu_387","dest":"https://blog.csdn.net/Allen_liyu/article/details/79508737","strategy":"searchFromBaidu1","index":"3"}" data-track-view="{"mod":"popu_387","dest":"https://blog.csdn.net/Allen_liyu/article/details/79508737","strategy":"searchFromBaidu1","index":2,"extend1":"_"}" data-track-click="{"mod":"popu_387","dest":"https://blog.csdn.net/Allen_liyu/article/details/79508737","strategy":"searchFromBaidu1","index":2,"extend1":"_"}" data-flg="true"> <a href="https://blog.csdn.net/Allen_liyu/article/details/79508737" target="_blank"> <h4 class="text-truncate oneline" style="width: 774px;">Java项目彻底<em>解决</em>中文<em>乱码</em>问题_Java_Allen_liyu的博客-CSDN博客</h4> <div class="info-box d-flex align-content-center"> <p> <span class="date">4-11</span> </p> </div> </a> </div><div class="recommend-item-box baiduSearch recommend-box-ident" data-report-view="{"mod":"popu_387","dest":"https://blog.csdn.net/u011247942/article/details/88650340","strategy":"searchFromBaidu1","index":"4"}" data-report-click="{"mod":"popu_387","dest":"https://blog.csdn.net/u011247942/article/details/88650340","strategy":"searchFromBaidu1","index":"4"}" data-track-view="{"mod":"popu_387","dest":"https://blog.csdn.net/u011247942/article/details/88650340","strategy":"searchFromBaidu1","index":3,"extend1":"_"}" data-track-click="{"mod":"popu_387","dest":"https://blog.csdn.net/u011247942/article/details/88650340","strategy":"searchFromBaidu1","index":3,"extend1":"_"}" data-flg="true"> <a href="https://blog.csdn.net/u011247942/article/details/88650340" target="_blank"> <h4 class="text-truncate oneline" style="width: 774px;">Java后台开发中<em>乱码</em>的转换_u011247942的博客-CSDN博客</h4> <div class="info-box d-flex align-content-center"> <p> <span class="date">1-10</span> </p> </div> </a> </div>
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
03-19 阅读数 67万+
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频... 博文 来自: 帅地
在中国程序员是青春饭吗?
04-14 阅读数 27万+
今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。目录:你以为的人生 一次又一次的伤害 猎头界的真... 博文 来自: 启舰
超全Python图像处理讲解(多图预警)
04-07 阅读数 3万+
文章目录Pillow模块讲解一、Image模块1.1 、打开图片和显示图片1.2、创建一个简单的图像1.3、图像混合(1)透明度混合(2)遮罩混合1.4、图像缩放(1)按像素缩放(2)按尺寸缩放1.5... 博文 来自: ZackSock的博客
为什么猝死的都是程序员,基本上不见产品经理猝死呢?
01-05 阅读数 16万+
相信大家时不时听到程序员猝死的消息,但是基本上听不到产品经理猝死的消息,这是为什么呢?我们先百度搜一下:程序员猝死,出现将近700多万条搜索结果:搜索一下:产品经理猝死,只有400万条的搜索结果,从搜... 博文 来自: 曹银飞的专栏
推荐10个堪称神器的学习网站
02-25 阅读数 28万+
每天都会收到很多读者的私信,问我:“二哥,有什么推荐的学习网站吗?最近很浮躁,手头的一些网站都看烦了,想看看二哥这里有什么新鲜货。”今天一早做了个恶梦,梦到被老板辞退了。虽然说在我们公司,只有我辞退老... 博文 来自: 沉默王二
强烈推荐10本程序员必读的书
01-27 阅读数 10万+
很遗憾,这个春节注定是刻骨铭心的,新型冠状病毒让每个人的神经都是紧绷的。那些处在武汉的白衣天使们,尤其值得我们的尊敬。而我们这些窝在家里的程序员,能不外出就不外出,就是对社会做出的最大的贡献。有些读者... 博文 来自: 沉默王二
没有项目经验怎么办?
01-30 阅读数 1万+
职场和学校最大的不同就是:你在学校,老师给一本书,然后你考试。如果没有通过,就要补考。你在职场,领导给你一个问题,然后你来解决。如果解决不了,就要滚蛋走人。为此,你需要每半年更新一次简历...... 博文 来自: 微信公众号:猴子聊人物
为什么说程序员做外包没前途?
02-03 阅读数 12万+
之前做过不到3个月的外包,2020的第一天就被释放了,2019年还剩1天,我从外包公司离职了。我就谈谈我个人的看法吧。首先我们定义一下什么是有前途 稳定的工作环境 不错的收入 能够在项目中不断... 博文 来自: dotNet全栈开发
B 站上有哪些很好的学习资源?
02-06 阅读数 14万+
哇说起B站,在小九眼里就是宝藏般的存在,放年假宅在家时一天刷6、7个小时不在话下,更别提今年的跨年晚会,我简直是跪着看完的!!最早大家聚在在B站是为了追番,再后来我在上面刷欧美新歌和漂亮小姐姐的舞蹈视... 博文 来自: 九章算法的博客
新来个技术总监,禁止我们使用Lombok!
02-11 阅读数 5万+
我有个学弟,在一家小型互联网公司做Java后端开发,最近他们公司新来了一个技术总监,这位技术总监对技术细节很看重,一来公司之后就推出了很多"政策",比如定义了很多开发规范、日志规范、甚至是要求大家统一... 博文 来自: HollisChuang's Blog
在三线城市工作爽吗?
02-15 阅读数 10万+
我是一名程序员,从正值青春年华的 24 岁回到三线城市洛阳工作,至今已经 6 年有余。一不小心又暴露了自己的实际年龄,但老读者都知道,我驻颜有术,上次去看房子,业务员肯定地说:“小哥肯定比我小,我今年... 博文 来自: 沉默王二
Java基础知识面试题(2020最新版)
02-19 阅读数 9万+
文章目录Java概述何为编程什么是Javajdk1.5之后的三大版本JVM、JRE和JDK的关系什么是跨平台性?原理是什么Java语言有哪些特点什么是字节码?采用字节码的最大好处是什么什么是Java程... 博文 来自: ThinkWon的博客
@程序员:GitHub这个项目快薅羊毛
02-19 阅读数 2万+
今天下午在朋友圈看到很多人都在发github的羊毛,一时没明白是怎么回事。后来上百度搜索了一下,原来真有这回事,毕竟资源主义的羊毛不少啊,1000刀刷爆了朋友圈!不知道你们的朋友圈有没有看到类似的消息... 博文 来自: dotNet全栈开发
做了5年运维,靠着这份监控知识体系,我从3K变成了40K
02-21 阅读数 2万+
从来没讲过运维,因为我觉得运维这种东西不需要太多的知识面,然后我一个做了运维朋友告诉我大错特错,他就是从3K的运维一步步到40K的,甚至笑着说:我现在感觉自己什么都能做。既然讲,就讲最重要的吧。监控是... 博文 来自: Leo的博客
删库了,我们一定要跑路吗?
02-23 阅读数 2万+
在工作中,我们误删数据或者数据库,我们一定需要跑路吗?我看未必,程序员一定要学会自救,神不知鬼不觉的将数据找回。在 mysql 数据库中,我们知道 binlog 日志记录了我们对数据库的所有操作,所以... 博文 来自: 平头哥的技术博文
又一程序员删库跑路了
02-25 阅读数 3万+
loonggg读完需要2分钟速读仅需 1 分钟今天刷爆朋友圈和微博的一个 IT 新闻,估计有很多朋友应该已经看到了。程序员删库跑路的事情又发生了,不是调侃,而是真实的事情。微盟官网发布公...... 博文 来自: 非著名程序员
再不跳槽,应届毕业生拿的都比我多了!
02-27 阅读数 1万+
跳槽几乎是每个人职业生涯的一部分,很多HR说“三年两跳”已经是一个跳槽频繁与否的阈值了,可为什么市面上有很多程序员不到一年就跳槽呢?他们不担心影响履历吗?PayScale之前发布的**《员工最短任期公... 博文 来自: 九章算法的博客
String s = new String(" a ") 到底产生几个对象?
02-28 阅读数 1万+
老生常谈的一个梗,到2020了还在争论,你们一天天的,哎哎哎,我不是针对你一个,我是说在座的各位都是人才!上图红色的这3个箭头,对于通过new产生一个字符串(”宜春”)时,会先去常量池中查找是否已经有... 博文 来自: 宜春
技术大佬:我去,你写的 switch 语句也太老土了吧
03-01 阅读数 4万+
昨天早上通过远程的方式 review 了两名新来同事的代码,大部分代码都写得很漂亮,严谨的同时注释也很到位,这令我非常满意。但当我看到他们当中有一个人写的 switch 语句时,还是忍不住破口大骂:“... 博文 来自: 沉默王二
当年,非典SARS真的是我们战胜的吗?
03-02 阅读数 8846
这里是小汤山医院。医院早拆了,只剩一片芦苇荒地,和四周悄然兴建的温泉别墅。原本不该存在小汤山医院,是2003年最痛的伤痕。这是最近突然火起来的国产记录片《非典十年祭》。记录了那一场完全意...... 博文 来自: 纯洁的微笑
和黑客斗争的 6 天!
03-04 阅读数 4万+
互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...... 博文 来自: 纯洁的微笑
你以为这样写Java代码很6,但我看不懂
03-07 阅读数 8328
为了提高 Java 编程的技艺,我最近在 GitHub 上学习一些高手编写的代码。下面这一行代码(出自大牛之手)据说可以征服你的朋友,让他们觉得你写的代码很 6,来欣赏一下吧。IntStream.ra... 博文 来自: 沉默王二
给新手程序员的一点学习建议
02-06 阅读数 5586
我是一个有几年经验的程序员,之前对于自己的发展却是一头雾水,不知道主流技术,不知道工作是迎合主流技术还是迎合公司发展。让我有感触的是这两年的坚持学习,在迎合公司的发展的前提下,有自己的学...... 博文 来自: JAVA圈的博客
<div class="recommend-item-box type_hot_word">
<div class="content clearfix" style="width: 852px;">
<div class="float-left">
<span>
<a href="https://java.csdn.net/" data-report-click="{"mod":"1586412712_001","dest":"https://java.csdn.net/","index":"索引1"}" data-report-view="{"mod":"1586412712_001","dest":"https://java.csdn.net/","index":"1"}" target="_blank">
Java</a>
</span>
<span>
<a href="https://c1.csdn.net/" data-report-click="{"mod":"1586412712_001","dest":"https://c1.csdn.net/","index":"索引2"}" data-report-view="{"mod":"1586412712_001","dest":"https://c1.csdn.net/","index":"2"}" target="_blank">
C语言</a>
</span>
<span>
<a href="https://python.csdn.net/" data-report-click="{"mod":"1586412712_001","dest":"https://python.csdn.net/","index":"索引3"}" data-report-view="{"mod":"1586412712_001","dest":"https://python.csdn.net/","index":"3"}" target="_blank">
Python</a>
</span>
<span>
<a href="https://cplus.csdn.net/" data-report-click="{"mod":"1586412712_001","dest":"https://cplus.csdn.net/","index":"索引4"}" data-report-view="{"mod":"1586412712_001","dest":"https://cplus.csdn.net/","index":"4"}" target="_blank">
C++</a>
</span>
<span>
<a href="https://csharp.csdn.net/" data-report-click="{"mod":"1586412712_001","dest":"https://csharp.csdn.net/","index":"索引5"}" data-report-view="{"mod":"1586412712_001","dest":"https://csharp.csdn.net/","index":"5"}" target="_blank">
C#</a>
</span>
<span>
<a href="https://vbn.csdn.net/" data-report-click="{"mod":"1586412712_001","dest":"https://vbn.csdn.net/","index":"索引6"}" data-report-view="{"mod":"1586412712_001","dest":"https://vbn.csdn.net/","index":"6"}" target="_blank">
Visual Basic .NET</a>
</span>
<span>
<a href="https://js.csdn.net/" data-report-click="{"mod":"1586412712_001","dest":"https://js.csdn.net/","index":"索引7"}" data-report-view="{"mod":"1586412712_001","dest":"https://js.csdn.net/","index":"7"}" target="_blank">
JavaScript</a>
</span>
<span>
<a href="https://php.csdn.net/" data-report-click="{"mod":"1586412712_001","dest":"https://php.csdn.net/","index":"索引8"}" data-report-view="{"mod":"1586412712_001","dest":"https://php.csdn.net/","index":"8"}" target="_blank">
PHP</a>
</span>
<span>
<a href="https://sql.csdn.net/" data-report-click="{"mod":"1586412712_001","dest":"https://sql.csdn.net/","index":"索引9"}" data-report-view="{"mod":"1586412712_001","dest":"https://sql.csdn.net/","index":"9"}" target="_blank">
SQL</a>
</span>
<span>
<a href="https://go.csdn.net/" data-report-click="{"mod":"1586412712_001","dest":"https://go.csdn.net/","index":"索引10"}" data-report-view="{"mod":"1586412712_001","dest":"https://go.csdn.net/","index":"10"}" target="_blank">
Go语言</a>
</span>
<span>
<a href="https://r.csdn.net/" data-report-click="{"mod":"1586412712_001","dest":"https://r.csdn.net/","index":"索引11"}" data-report-view="{"mod":"1586412712_001","dest":"https://r.csdn.net/","index":"11"}" target="_blank">
R语言</a>
</span>
<span>
<a href="https://assembly.csdn.net/" data-report-click="{"mod":"1586412712_001","dest":"https://assembly.csdn.net/","index":"索引12"}" data-report-view="{"mod":"1586412712_001","dest":"https://assembly.csdn.net/","index":"12"}" target="_blank">
Assembly language</a>
</span>
<span>
<a href="https://swift.csdn.net/" data-report-click="{"mod":"1586412712_001","dest":"https://swift.csdn.net/","index":"索引13"}" data-report-view="{"mod":"1586412712_001","dest":"https://swift.csdn.net/","index":"13"}" target="_blank">
Swift</a>
</span>
<span>
<a href="https://ruby.csdn.net/" data-report-click="{"mod":"1586412712_001","dest":"https://ruby.csdn.net/","index":"索引14"}" data-report-view="{"mod":"1586412712_001","dest":"https://ruby.csdn.net/","index":"14"}" target="_blank">
Ruby</a>
</span>
<span>
<a href="https://matlab.csdn.net/" data-report-click="{"mod":"1586412712_001","dest":"https://matlab.csdn.net/","index":"索引15"}" data-report-view="{"mod":"1586412712_001","dest":"https://matlab.csdn.net/","index":"15"}" target="_blank">
MATLAB</a>
</span>
<span>
<a href="https://plsql.csdn.net/" data-report-click="{"mod":"1586412712_001","dest":"https://plsql.csdn.net/","index":"索引16"}" data-report-view="{"mod":"1586412712_001","dest":"https://plsql.csdn.net/","index":"16"}" target="_blank">
PL/SQL</a>
</span>
<span>
<a href="https://perl.csdn.net/" data-report-click="{"mod":"1586412712_001","dest":"https://perl.csdn.net/","index":"索引17"}" data-report-view="{"mod":"1586412712_001","dest":"https://perl.csdn.net/","index":"17"}" target="_blank">
Perl</a>
</span>
<span>
<a href="https://vb.csdn.net/" data-report-click="{"mod":"1586412712_001","dest":"https://vb.csdn.net/","index":"索引18"}" data-report-view="{"mod":"1586412712_001","dest":"https://vb.csdn.net/","index":"18"}" target="_blank">
Visual Basic</a>
</span>
<span>
<a href="https://obj.csdn.net/" data-report-click="{"mod":"1586412712_001","dest":"https://obj.csdn.net/","index":"索引19"}" data-report-view="{"mod":"1586412712_001","dest":"https://obj.csdn.net/","index":"19"}" target="_blank">
Objective-C</a>
</span>
<span>
<a href="https://delphi.csdn.net/" data-report-click="{"mod":"1586412712_001","dest":"https://delphi.csdn.net/","index":"索引20"}" data-report-view="{"mod":"1586412712_001","dest":"https://delphi.csdn.net/","index":"20"}" target="_blank">
Delphi/Object Pascal</a>
</span>
<span>
<a href="https://www.csdn.net/unity/" data-report-click="{"mod":"1586412712_001","dest":"https://www.csdn.net/unity/","index":"索引21"}" data-report-view="{"mod":"1586412712_001","dest":"https://www.csdn.net/unity/","index":"21"}" target="_blank">
Unity3D</a>
</span>
</div>
</div>
</div>
<div class="recommend-loading-box">
<img src="https://csdnimg.cn/release/phoenix/images/feedLoading.gif">
</div>
<div class="recommend-end-box" style="display: block;">
<p class="text-center">没有更多推荐了,<a href="https://blog.csdn.net/" class="c-blue c-blue-hover c-blue-focus">返回首页</a></p>
</div>
</div>
<div class="template-box">
<span>©️2019 CSDN</span><span class="point"></span>
<span>皮肤主题: 大白</span>
<span> 设计师:
CSDN官方博客 </span>
</div>
</main>