Springboot启动,控制台卡死在 Parsed mapper file
问题Springboot启动,控制台停在 Parsed mapper file 'file[************mapper.xml]排查到源码这个方法的catch打断点,可发现异常org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactoryprotected Object doCreateBean(f
·
问题
Springboot启动,控制台停在 Parsed mapper file 'file[************mapper.xml]
排查
到源码这个方法的catch打断点,可发现异常
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
protected Object doCreateBean(final String beanName, final RootBeanDefinition mbd, final @Nullable Object[] args)
throws BeanCreationException {
// 省略
try {
populateBean(beanName, mbd, instanceWrapper);
exposedObject = initializeBean(beanName, exposedObject, mbd);
}
catch (Throwable ex) {
if (ex instanceof BeanCreationException && beanName.equals(((BeanCreationException) ex).getBeanName())) {
throw (BeanCreationException) ex;
}
else {
throw new BeanCreationException(
mbd.getResourceDescription(), beanName, "Initialization of bean failed", ex);
}
}
}
根据实际报错信息解决,比如我的异常如下,少个了配置项
org.springframework.beans.factory.BeanCreationException: Error creating bean with name '***Service': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder '***' in value "${***}"
但是这个为什么没打在控制台呢
发现是logback配置的问题,springProfile是dev时才打在console,修改了以后,就能把报错打在控制台了
更多推荐
已为社区贡献13条内容
所有评论(0)