当前位置:   article > 正文

Springboot启动时出错_schema validation: property 'serverversion' is not

schema validation: property 'serverversion' is not allowed
Action:

Consider the following:
	If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
	If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).
  • 1
  • 2
  • 3
  • 4
  • 5

错误源于在开始创建springboot的时候开启了mabtis-starter,由于没有设置数据库链接的相关信息,项目就会启动失败

解决方法:在 主类上取消加载数据库相关的类

@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
  • 1

另外@Autowired 注解 一次只能注入一个对象属性.

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家小花儿/article/detail/595657
推荐阅读
相关标签
  

闽ICP备14008679号