先看错误
***************************
APPLICATION FAILED TO START
***************************
Description:
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).
解决
网上有很多解决文章,比如:
完美解决Failed to determine a suitable driver class的问题
然而,我其实之前是可以,突然间不行了。查看了git的历史,最近也就在profile里改了个port,为什么会影响到数据库连接呢?
没有任何头绪,万能大法,重启电脑都用了,还是不行。
于是我把profile里面除了数据库配置,其他行全部删了,当然也包括这个server.port=9091
神奇了,数据库不报错了。当然因为删了其他配置,其他报错了。 然后慢慢把配置都贴回去,贴完,就好了 。。。。。
总结
个人猜想是当时改这个port,这行语句也行字符有问题啥的,引起了编译器的bug。就这样吧。。。