Failed to configure a DataSource: ‘url’ attribute is not specified and no embedded datasource could be configured.
Error Messages:
***************************
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).
Solution:
You need to add a configuration in your project’s POM file
<build>
<resources>
<!-- Resolving mapper binding exceptions -->
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.yml</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
<!-- Resolve profile exceptions such as data source not found -->
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.yml</include>
</includes>
</resource>
</resources>
</build>
Read More:
- [Solved] ### Error building SqlSession. ### The error may exist in com/atguigu/dao/SysUserMapper.xml ### Caus
- [Solved] SpringBoot Error: Property ‘mapperLocations‘ was not specified.
- [How to Solve] Invalid bound statement (not found)
- Resources is configured in the build of Maven project to prevent the failure of resource export
- [Maven] maven filtering OTS parsing error incorrect file size in WOFF head [Two Methods to Solve]
- How to Solve Mybatis error: invalid bound statement (not found)
- [Solved] Could not find resource COM / atguigu / Dao / studentdao.xm, the mapper file for storing SQL statements could not be found and an error occurred
- Cannot resolve reference to bean ‘sqlSessionFactory‘ while setting bean property ‘sqlSessionFactory‘
- There was an unexpected error (type=Internal Server Error, status=500).Invalid bound statement (not
- [Solved] Mybatis Error: Could not find resource mybatis-conf.xml
- [Solved] IDEA Start Maven Project Error: “Error starting ApplicationContext. To display the conditions report …”
- [Solved] Mybatis-Plus Error: Invalid bound statement (not found)
- Springboot Project: How to Introduces Local Jar Package
- Mybatis reports an error (error building sqlsession.) when using annotations without deleting redundant files
- Build a mybatis and it will appear session.selectOne Method error
- [Solved] mybatis Error querying database. Cause: java.sql.SQLException: The server time zone value
- [Solved] The war package Error: The reason why the XSD file could not be found
- Java database Druid error: com.alibaba.druid.pool.DruidDataSource error
- Springcloud builds a gateway and starts Error [Solved]
- [Solved] Springboot Error: Error creating bean with name ‘dataSource‘ defined in class path resource