java.lang.IllegalArgumentException: Property’dataSource’ is required
When I was working on a travel website today, I encountered an exception. The console showed that there was an error when creating the JdbcTemplate object. After inspection, it was found that the code in the custom JDBCUtils tool class
InputStream is = JDBCUtils.class.getClassLoader( ).getResourceAsStream(“druid.properties”);
Add one more / to the configuration file path inside, just remove /; or the durid.properties file is placed in the wrong location, the correct one is to put it in the src directory, not The directory of the project.
Read More:
- [Solved] Failed to bind properties under ‘spring.datasource.type‘ to java.lang.Class<javax.sql.DataSource>
- [How to Solve] java.lang.IllegalArgumentException: Request header is too large
- Hive ERROR Failed with exception java.io.IOException:java.lang.IllegalArgumentException
- [Solved] Hive tez due to: ROOT_INPUT_INIT_FAILURE java.lang.IllegalArgumentException: Illegal Capacity: -38297
- [Solved] .java.lang.IllegalArgumentException: requirement failed: Can only call getServletHandlers on a runn
- [Solved] JMeter Server Command line pressure measurement: Error in NonGUIDriver java.lang.IllegalArgumentException
- [Solved] Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded datasource could
- [Solved] Mybatis Error: CannotFindDataSourceException: dynamic-datasource can not find primary datasource
- NestedServletException, Handler dispatch failed; nested exception is java.lang.StackOverflowError [Solved]
- [Solved] swagger3 Error: org.springframework.context.ApplicationContextException: Failed to start bean ‘documentationPluginsBootstrapper’; nested exception is java.lang.NullPointerException
- [Solved] java.lang.reflect.InaccessibleObjectException: Unable to make protected java.net.http.HttpRequest()…
- POI Export Excel Error: HTTP Status 500 – Request processing failed; nested exception is java.lang.NullPointerException
- [Solved] Azkaban Error: Missing required property ‘azkaban.native.lib’
- [Solved] Request processing failed; nested exception is java.lang.NullPointerException
- [Solved] Springboot Reflection calls ServiceImpl Error: java.lang.NullPointerException, mapper is null
- Java.lang.AbstractMethodError: org.mybatis.spring.transaction.SpringManagedTransaction.getTimeout()Ljava/lang/Integer; error resolution
- [Solved] Response Export error on submit request on future invoke, java.lang.OutOfMemoryError: Java heap space
- [Solved] Android DataBinding Error: java.lang.ArrayIndexOutOfBoundsException: length=2; index=2 fragment Changes to Fragm
- [Solved] Android Error: java.lang.IllegalStateException: Not allowed to start service Intent