|
@@ -22,7 +22,9 @@ public abstract class AbstractInterceptor extends HandlerInterceptorAdapter impl
|
|
|
if (apiConfig == null) {
|
|
|
if (handler instanceof HandlerMethod) {
|
|
|
apiConfig = apiConfigService.getApiConfig((HandlerMethod) handler);
|
|
|
- } else {
|
|
|
+ }
|
|
|
+ // 容器尚未初始化完成时,按照配置构建以防报错
|
|
|
+ if (apiConfig == null) {
|
|
|
apiConfig = new ApiConfig(apiProperties);
|
|
|
}
|
|
|
request.setAttribute(ATTRIBUTE_API_CONFIG, apiConfig);
|