51
Dev开发社区
首页
文章
问答
工具
搜索
登录
注册
#ai
慎用ArrayList的contains方法,使用HashSet的contains方法代替
在启动一个应用的时候,发现其中有一处数据加载要数分钟,刚开始以为是需要load的数据比较多的缘故,查了一下数据库有6条左右,但是单独写了一个数据读取的方法,将这6万多条全部读过来,却只需要不到10秒钟,就觉得这里面肯定有问题,于是仔细看其中的逻辑,其中有一段数据去重的逻辑,就是记录中存在某几个字段相同的,就认为是重复数...
代码星球
·
2020-04-04
contains
方法
慎用
ArrayList
使用
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...
代码星球
·
2020-04-04
to
need
HikariCP
脑火
Failed
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...
代码星球
·
2020-04-04
Tomcat
启动
log
打印
INFO
log4j1修改DailyRollingFileAppender支持日志最大数量
配置说明:log4j.appender.logfile=org.apache.log4j.MyDailyRollingFileAppenderlog4j.appender.logfile.File=test.loglog4j.appender.logfile.DatePattern='.'yyy...
代码星球
·
2020-04-04
log4j1
修改
DailyRollingFileAppender
支持
日志
Handshake failed due to invalid Upgrade header: null 解决方案
解决方案,在 Nginx ,location中添加以下红色代码:proxy_set_headerUpgrade$http_upgrade;proxy_set_headerConnection "upgrade"; server{listen80;server_namelocalh...
代码星球
·
2020-04-04
Handshake
failed
due
to
invalid
MySQL wait_timeout参数设置与网上常见错误小纠
discardconnectioncom.mysql.jdbc.exceptions.jdbc4.CommunicationsException:CommunicationslinkfailureThelastpacketsuccessfullyreceivedfromtheserverwas1,210,8...
代码星球
·
2020-04-04
MySQL
wait
timeout
参数
设置
List和set集合:交集、差集、合集的区别retainAll,removeAll、addAll
set、list集合的交集(retainAll)、差集(removeAll)是没有区别的都是一样的.set、list集合的合集addAll是有区别的:set可以去重复;list不去重复 publicstaticvoidmain(String[]args){ &nb...
代码星球
·
2020-04-04
List
set
集合
交集
差集
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...
代码星球
·
2020-04-04
home
Circular
view
path
would
版本不匹配引发的坑:javax.validation.UnexpectedTypeException: HV000030: No validator could be found for constraint
发现一个API报了错:javax.validation.UnexpectedTypeException:HV000030:Novalidatorcouldbefoundforconstraint'javax.validation.constraints.NotEmpty'validatingtype'java.lang...
代码星球
·
2020-04-04
版本
不匹配
引发
javax.validation.UnexpectedTypeException
HV000030
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"的格式被视为非...
代码星球
·
2020-04-04
COOKIE
Tomcat
header
was
received
Error creating bean with name 'tomcatEmbeddedServletContainerFactory ' (or a BeanPostProcessor involved) returned null
org.springframework.boot.autoconfigure.web.EmbeddedServletContainerAutoConfiguration$EmbeddedTomcatorg.springframework.boot.autoconfigure.web.EmbeddedServ...
代码星球
·
2020-04-04
Error
creating
bean
with
name
ASP.NET WebForm中用async/await实现异步
1.在.aspx中添加异步标记<%@PageLanguage="C#"Async="true"%>2.在.aspx.cs或者.ascx.cs(用户控件)中添加异步方法privateasyncTaskGetMyPosts(){varposts=awaitServiceFactory.BlogPostSevic...
代码星球
·
2020-04-04
ASP.NET
WebForm
中用
async
await
AspNet Identity and IoC Container Registration
https://github.com/trailmax/IoCIdentitySample TL;DR: Registrationcode forAutofac, forSimpleInjector, forUnity.TonyMackayhasanalte...
代码星球
·
2020-04-04
AspNet
Identity
and
IoC
Container
NopCommerce源码分析ContainerBuilder builder.Update(container)
///<summary>///Registerdependencies///</summary>///<paramname="config">Config</param>protectedvirtualvoidRegisterDependencies(NopConfigc...
代码星球
·
2020-04-04
NopCommerce
源码
分析
ContainerBuilder
builder.Update
autofac Adding services after container has been built
http://stackoverflow.com/questions/6173566/run-time-registration-with-autofac Yesyoucan,usingthe Update methodon ContainerBuilder:varnewBuil...
代码星球
·
2020-04-04
autofac
Adding
services
after
container
首页
上一页
...
223
224
225
226
227
...
下一页
尾页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他