java - 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}"
这个。
我怎么做..给我答案
即使是过去通过的代码也失败了。
我不明白问题是什么。
我做到了~
- 重启泊坞窗
- 重启h2数据库
解决方案
推荐阅读
- nlp - RuntimeError:张量 a (546) 的大小必须与非单维 1 的张量 b (512) 的大小相匹配
- kubernetes - 获取 Kubernetes 中要删除的资源的警告
- r - 在 R 中计算 Returns1>Returns2 的天数
- python-3.x - 是否可以对 conda 或 pipenv 环境进行分层?
- c - C:无法从连接到子进程标准输出的管道中读取
- r - 如何连接连字符并分成两行的单词
- javascript - 在内联css样式中预期“,”
- python - Pylint Import "import routes" 应该放在模块的顶部
- python - 用另一个函数替换一个函数
- r - 将几行放入R中的一列