jenkins部署war 报错required: java.lang.Long found: java.lang.Object
处理jenkins部署war的时候出现如下错误:[INFO] -------------------------------------------------------------[ERROR] COMPILATION ERROR :[INFO] -------------------------------------------------------------
·
处理jenkins部署war的时候出现如下错误:
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /diska/jenkins/data/workspace/ci/src/main/java/cn/com/g/cloud/ci/service/que/impl/BaseService.java:[823,48] incompatible types
required: java.lang.Long
found: java.lang.Object
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
public Long incr(final String key) {
return 10000L;
return strRedisTemplate.execute(new RedisCallback() {
@Override
public Long doInRedis(RedisConnection connection) throws DataAccessException {
connection.setNX(key.getBytes(), "100000".getBytes());
Long rs = connection.incr(key.getBytes());
return rs;
}
});
}
public Long incr(final String key) {
return 10000L;
return (Long)strRedisTemplate.execute(new RedisCallback() {
@Override
public Long doInRedis(RedisConnection connection) throws DataAccessException {
connection.setNX(key.getBytes(), "100000".getBytes());
Long rs = (Long)connection.incr(key.getBytes());
return rs;
}
});
}
修改后重启构建,果然成功了。
更多推荐
已为社区贡献4条内容
所有评论(0)