#ai

慎用ArrayList的contains方法,使用HashSet的contains方法代替

在启动一个应用的时候,发现其中有一处数据加载要数分钟,刚开始以为是需要load的数据比较多的缘故,查了一下数据库有6条左右,但是单独写了一个数据读取的方法,将这6万多条全部读过来,却只需要不到10秒钟,就觉得这里面肯定有问题,于是仔细看其中的逻辑,其中有一段数据去重的逻辑,就是记录中存在某几个字段相同的,就认为是重复数...

HikariCP 脑火Failed to obtain JDBC Connection: You need to run the CLI build and you need target/classes in your classpath to run.

测试了一下HikariCP连接池报错,无解十一月16,20175:31:59下午org.apache.catalina.core.StandardContextloadOnStartup严重:Servlet[InitTaskServlet]inwebapplication[]threwload()exceptionor...

Tomcat启动log打印到INFO: At least one JAR was scanned for TLDs yet contained no TLD各种解决方式

问题:启动tomcat时,catalina.out日志打印到如下内容就停止不动了,也不报错SEVERE:FarmWarDeployercanonlyworkashostclustersubelement!Dec02,20164:27:39PMorg.apache.catalina.startup.HostConfigd...

log4j1修改DailyRollingFileAppender支持日志最大数量

  配置说明:log4j.appender.logfile=org.apache.log4j.MyDailyRollingFileAppenderlog4j.appender.logfile.File=test.loglog4j.appender.logfile.DatePattern='.'yyy...

Handshake failed due to invalid Upgrade header: null 解决方案

解决方案,在 Nginx ,location中添加以下红色代码:proxy_set_headerUpgrade$http_upgrade;proxy_set_headerConnection "upgrade"; server{listen80;server_namelocalh...

MySQL wait_timeout参数设置与网上常见错误小纠

 discardconnectioncom.mysql.jdbc.exceptions.jdbc4.CommunicationsException:CommunicationslinkfailureThelastpacketsuccessfullyreceivedfromtheserverwas1,210,8...

List和set集合:交集、差集、合集的区别retainAll,removeAll、addAll

 set、list集合的交集(retainAll)、差集(removeAll)是没有区别的都是一样的.set、list集合的合集addAll是有区别的:set可以去重复;list不去重复 publicstaticvoidmain(String[]args){   &nb...

Circular view path [home]: would dispatch back to the current handler URL [/home] again. Check your ViewResolver setup!

Circularviewpath[home]:woulddispatchbacktothecurrenthandlerURL[/home]again.CheckyourViewResolversetup!(Hint:Thismaybetheresultofanunspecifiedview,duetodefaultvi...

版本不匹配引发的坑:javax.validation.UnexpectedTypeException: HV000030: No validator could be found for constraint

发现一个API报了错:javax.validation.UnexpectedTypeException:HV000030:Novalidatorcouldbefoundforconstraint'javax.validation.constraints.NotEmpty'validatingtype'java.lang...

Tomcat:A cookie header was received[xxxxxx] that contained an invalid cookie. That cookie will be ignored.

 搬运来源:https://blogs.yahoo.co.jp/dk521123/36721868.html*从Tomcat8,Cookie的解析已经符合RFC6265。*由于RFC6265不再接受以前允许的逗号分隔符(例如RFC2109)"Cookie:KEY1=VAL1,KEY2=VAL2"的格式被视为非...

Error creating bean with name 'tomcatEmbeddedServletContainerFactory ' (or a BeanPostProcessor involved) returned null

 org.springframework.boot.autoconfigure.web.EmbeddedServletContainerAutoConfiguration$EmbeddedTomcatorg.springframework.boot.autoconfigure.web.EmbeddedServ...

ASP.NET WebForm中用async/await实现异步

1.在.aspx中添加异步标记<%@PageLanguage="C#"Async="true"%>2.在.aspx.cs或者.ascx.cs(用户控件)中添加异步方法privateasyncTaskGetMyPosts(){varposts=awaitServiceFactory.BlogPostSevic...

AspNet Identity and IoC Container Registration

https://github.com/trailmax/IoCIdentitySample  TL;DR: Registrationcode forAutofac, forSimpleInjector, forUnity.TonyMackayhasanalte...

NopCommerce源码分析ContainerBuilder builder.Update(container)

///<summary>///Registerdependencies///</summary>///<paramname="config">Config</param>protectedvirtualvoidRegisterDependencies(NopConfigc...

autofac Adding services after container has been built

http://stackoverflow.com/questions/6173566/run-time-registration-with-autofac Yesyoucan,usingthe Update methodon ContainerBuilder:varnewBuil...
首页上一页...223224225226227...下一页尾页