首页 > 解决方案 > Spring TestCode 错误:无法加载 ApplicationContext

问题描述

我编写测试代码,但它的代码调用了许多错误消息。

我认为主要的错误信息是

java.lang.IllegalStateException: Failed to load ApplicationContext

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageSource' defined in class path resource [com/server/Dotori/config/exception/MessageConfiguration.class]: Unexpected exception during bean creation; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'spring.messages.basename' in value "${spring.messages.basename}"

Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'spring.messages.basename' in value "${spring.messages.basename}"

这个。

我怎么做..给我答案

即使是过去通过的代码也失败了。

我不明白问题是什么。

我做到了~

标签: javaspringspring-boot

解决方案


推荐阅读