Skip to content

Commit

Permalink
* getApplicationContext调用异常打印堆栈
Browse files Browse the repository at this point in the history
  • Loading branch information
Scorrt-2021 authored and Air-Cooled committed Apr 4, 2023
1 parent f3bb75c commit 291ee83
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import com.diboot.core.binding.parser.EntityInfoCache;
import com.diboot.core.binding.parser.ParserCache;
import com.diboot.core.binding.parser.PropInfo;
import com.diboot.core.exception.InvalidUsageException;
import com.diboot.core.service.BaseService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -86,6 +87,7 @@ public static ApplicationContext getApplicationContext() {
}
if(APPLICATION_CONTEXT == null){
log.warn("无法获取ApplicationContext,请确保ComponentScan扫描路径包含com.diboot包路径,并在Spring初始化之后调用接口!");
new InvalidUsageException("检查调用时机").printStackTrace();
}
return APPLICATION_CONTEXT;
}
Expand Down

0 comments on commit 291ee83

Please sign in to comment.