2017-01-19 16:35
@happyboy B向A请求了图片验证码。待B向A提交数据时候,A要从cookie中取出这个验证码,与B提交过来的验证码校验。然后然后……才是你说的数据返回的问题。
2017-01-19 13:58
@happyboy 比如登录验证码,需要服务端生成验证码,存入cookie,B站点提交用户登录数据,包括用户输入的验证码到A站点进行登录验证,A站点从cookie中取出验证码校验。这时候,B怎么自己处理cookie?
2017-01-18 09:21
可以了,但是还有一个小异常:
[WARN]-[Thread: main]-[net.sf.ehcache.config.ConfigurationFactory.parseConfiguration()]: No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/D:/Workspaces/MyEclipse%2010/API/WebRoot/WEB-INF/lib/ehcache-core-2.5.2.jar!/ehcache-failsafe.xml
这是什么?
2017-01-18 08:55
异常代码没显示完整,完整代码:
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/D:/Workspaces/MyEclipse%2010/API/WebRoot/WEB-INF/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/D:/Workspaces/MyEclipse%2010/API/WebRoot/WEB-INF/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
2017-01-18 08:41:53
[WARN]-[Thread: main]-[net.sf.ehcache.config.ConfigurationFactory.parseConfiguration()]: No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/D:/Workspaces/MyEclipse%2010/API/WebRoot/WEB-INF/lib/ehcache-core-2.5.2.jar!/ehcache-failsafe.xml
2016-12-14 22:18
@lyh061619 你写的这个 Duang.duang(CommonService.class) 是干嘛的?
2016-12-14 19:26
@JFinal 改造后的代码:
public void set( final String blogId ) {
Db.tx(new IAtom() {
@Override
public boolean run() throws SQLException {
Date now = new Date() ;
int count = Db.update("UPDATE t_today_readers tr SET tr.readTimes = tr.readTimes + 1 WHERE tr.blogId = ? AND tr.date = ? " , blogId , now );
if (count == 0) {
TodayReaders readTimes = new TodayReaders() ;
readTimes.setId(getIds());
readTimes.setReadTimes(1) ;
readTimes.setBlogId(blogId);
readTimes.setDate(now);
return readTimes.save();
}
return true ;
}
}) ;
}
这样就可以了吗?