Skip to content

Commit

Permalink
fixed:修复 inject 和 rpc 过滤无效的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
yangfuhai committed Mar 23, 2018
1 parent a7888d9 commit e6e733b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
9 changes: 8 additions & 1 deletion src/main/java/io/jboot/aop/JbootInjectManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,15 @@ private void beanBind(Binder binder) {
Class[] excludes = beanExclude == null ? default_excludes : ArrayUtils.concat(default_excludes, beanExclude.value());

for (Class interfaceClass : interfaceClasses) {
boolean isContinue = false;
for (Class ex : excludes) {
if (ex == interfaceClass) continue;
if (ex.isAssignableFrom(interfaceClass)) {
isContinue = true;
break;
}
}
if (isContinue) {
continue;
}
try {
if (StringUtils.isBlank(name)) {
Expand Down
9 changes: 8 additions & 1 deletion src/main/java/io/jboot/core/rpc/JbootrpcManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,15 @@ public void init() {
//对某些系统的类 进行排除,例如:Serializable 等
Class[] excludes = ArrayUtils.concat(default_excludes, rpcService.exclude());
for (Class inter : inters) {
boolean isContinue = false;
for (Class ex : excludes) {
if (ex == inter) continue;
if (ex.isAssignableFrom(inter)) {
isContinue = true;
break;
}
}
if (isContinue) {
continue;
}
getJbootrpc().serviceExport(inter, Jboot.bean(clazz), group, version, port);
}
Expand Down

0 comments on commit e6e733b

Please sign in to comment.