主页 > 开源代码  > 

SpringBoot启动失败之application.yml缩进没写好

SpringBoot启动失败之application.yml缩进没写好

修改前: spring前面空格了 报错输出:Failed to configure a DataSource: ‘url’ attribute is not specified and no embedded datasource could be configured.

Reason: Failed to determine a suitable driver class

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).

修改后:

总结 YAML文件对缩进非常敏感,必须使用空格(通常为2个空格)来表示层次结构,不能使用Tab键。

标签:

SpringBoot启动失败之application.yml缩进没写好由讯客互联开源代码栏目发布,感谢您对讯客互联的认可,以及对我们原创作品以及文章的青睐,非常欢迎各位朋友分享到个人网站或者朋友圈,但转载请说明文章出处“SpringBoot启动失败之application.yml缩进没写好