doc
This commit is contained in:
4
src/main/java/org/redkale/cache/Cached.java
vendored
4
src/main/java/org/redkale/cache/Cached.java
vendored
@@ -44,7 +44,7 @@ public @interface Cached {
|
||||
* 本地缓存过期时长, 0表示永不过期, -1表示不作本地缓存。<br>
|
||||
* 参数值支持方式:<br>
|
||||
* 100: 设置数值
|
||||
* 5*60: 乘法表达式,值为30
|
||||
* 5*60: 乘法表达式,值为300
|
||||
* ${env.cache.expires}: 读取系统配置项
|
||||
* #delays: 读取宿主对象的delays字段值作为值,字段类型必须是int、long数值类型
|
||||
*
|
||||
@@ -56,7 +56,7 @@ public @interface Cached {
|
||||
* 远程缓存过期时长, 0表示永不过期, -1表示不作远程缓存。<br>
|
||||
* 参数值支持方式:<br>
|
||||
* 100: 设置数值
|
||||
* 5*60: 乘法表达式,值为30
|
||||
* 5*60: 乘法表达式,值为300
|
||||
* ${env.cache.expires}: 读取系统配置项
|
||||
* #delays: 读取宿主对象的delays字段值作为值,字段类型必须是int、long数值类型
|
||||
*
|
||||
|
||||
@@ -79,8 +79,7 @@ public class HttpClusterRpcClient extends HttpRpcClient {
|
||||
private CompletableFuture<HttpResult<byte[]>> httpAsync(boolean produce, Serializable userid, HttpSimpleRequest req) {
|
||||
req.setTraceid(Traces.computeIfAbsent(req.getTraceid(), Traces.currentTraceid()));
|
||||
String module = req.getPath();
|
||||
module = module.substring(1); //去掉/
|
||||
module = module.substring(0, module.indexOf('/'));
|
||||
module = module.substring(1, module.indexOf('/', 1));
|
||||
HttpHeaders headers = req.getHeaders();
|
||||
String resname = req.getHeader(Rest.REST_HEADER_RESNAME, "");
|
||||
final String localModule = module;
|
||||
|
||||
@@ -233,7 +233,7 @@ public class HttpRequest extends Request<HttpContext> {
|
||||
return this;
|
||||
}
|
||||
|
||||
public HttpSimpleRequest createSimpleRequest(String prefixPath) {
|
||||
public HttpSimpleRequest createSimpleRequest(String contextPath) {
|
||||
HttpSimpleRequest req = new HttpSimpleRequest();
|
||||
req.setBody(array.length() == 0 ? null : array.getBytes());
|
||||
if (!getHeaders().isEmpty()) {
|
||||
@@ -241,6 +241,9 @@ public class HttpRequest extends Request<HttpContext> {
|
||||
if (headers.contains(Rest.REST_HEADER_RPC)) { //外部request不能包含RPC的header信息
|
||||
req.removeHeader(Rest.REST_HEADER_RPC);
|
||||
}
|
||||
if (headers.contains(Rest.REST_HEADER_RESNAME)) { //外部request不能包含RPC的header信息
|
||||
req.removeHeader(Rest.REST_HEADER_RESNAME);
|
||||
}
|
||||
if (headers.contains(Rest.REST_HEADER_CURRUSERID)) { //外部request不能包含RPC的header信息
|
||||
req.removeHeader(Rest.REST_HEADER_CURRUSERID);
|
||||
}
|
||||
@@ -250,11 +253,11 @@ public class HttpRequest extends Request<HttpContext> {
|
||||
req.setRemoteAddr(getRemoteAddr());
|
||||
req.setLocale(getLocale());
|
||||
req.setContentType(getContentType());
|
||||
req.setContextPath(prefixPath);
|
||||
req.setContextPath(contextPath);
|
||||
req.setMethod(this.method);
|
||||
String path0 = this.requestPath;
|
||||
if (isNotEmpty(prefixPath) && path0.startsWith(prefixPath)) {
|
||||
path0 = path0.substring(prefixPath.length());
|
||||
if (isNotEmpty(contextPath) && path0.startsWith(contextPath)) {
|
||||
path0 = path0.substring(contextPath.length());
|
||||
}
|
||||
req.setPath(path0);
|
||||
req.setSessionid(getSessionid(false));
|
||||
@@ -353,7 +356,7 @@ public class HttpRequest extends Request<HttpContext> {
|
||||
this.keepAlive = false; //文件上传必须设置keepAlive为false,因为文件过大时用户不一定会skip掉多余的数据
|
||||
}
|
||||
//completed=true时ProtocolCodec会继续读下一个request
|
||||
this.completed = !this.boundary && !maybews && this.headerParsed;
|
||||
this.completed = !this.boundary && !maybews && this.headerParsed;
|
||||
this.readState = READ_STATE_BODY;
|
||||
}
|
||||
if (this.readState == READ_STATE_BODY) {
|
||||
|
||||
@@ -51,7 +51,7 @@ public @interface Scheduled {
|
||||
* 延迟时间,支持参数配置、乘法表达式和对象字段值 <br>
|
||||
* 参数值支持方式:<br>
|
||||
* 100: 设置数值
|
||||
* 5*60: 乘法表达式,值为30
|
||||
* 5*60: 乘法表达式,值为300
|
||||
* ${env.scheduling.fixedDelay}: 读取系统配置项
|
||||
* #delays: 读取宿主对象的delays字段值作为值,字段类型必须是int、long数值类型
|
||||
*
|
||||
@@ -65,7 +65,7 @@ public @interface Scheduled {
|
||||
* 周期时间,支持参数配置、乘法表达式和对象字段值 <br>
|
||||
* 参数值支持方式:<br>
|
||||
* 100: 设置数值
|
||||
* 5*60: 乘法表达式,值为30
|
||||
* 5*60: 乘法表达式,值为300
|
||||
* ${env.scheduling.fixedRate}: 读取系统配置项
|
||||
* #intervals: 读取宿主对象的intervals字段值作为值,字段类型必须是int、long数值类型
|
||||
*
|
||||
@@ -79,7 +79,7 @@ public @interface Scheduled {
|
||||
* 起始延迟时间,支持参数配置、乘法表达式和对象字段值 <br>
|
||||
* 参数值支持方式:<br>
|
||||
* 100: 设置数值
|
||||
* 5*60: 乘法表达式,值为30
|
||||
* 5*60: 乘法表达式,值为300
|
||||
* ${env.scheduling.initialDelay}: 读取系统配置项
|
||||
* #inits: 读取宿主对象的inits字段值作为值,字段类型必须是int、long数值类型
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user