Solution:
Put the druid.properties file in the SRC directory
Change to absolute path:
Properties pro =new Properties();
// InputStream is= JDBCUtils.class.getClassLoader().getResourceAsStream("src/main/druid.properties");
// pro.load(is);
pro.load(new FileReader("src/druid.properties"));
ds= DruidDataSourceFactory.createDataSource(pro);
Read More:
- Mapper.xml Error: Error setting non null for parameter #3 with JdbcType null.
- [Solved] Java.lang.IllegalStateException: Type handler was null on parameter mapping for property ‘__frch_it
- [Solved] Tomcat runs JavaWeb servlet Error 404
- [Solved] mybatis plus Insert Error: mybatis plus Error setting null for parameter #1 with JdbcType OTHER
- javaweb Connect Datas Error: che.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1444)
- JNI ERROR (2354): JNI connection is NULL [How to Solve]
- [Solved] o2o Error: addShopImg error:null / character to be escaped is missing
- [Solved] ES Error: request contains unrecognized parameter [ignore_throttled]
- Mybatis single parameter pass in exception (How to Fix)
- [Solved] docker Start jar package and Set JVM parameter Error
- Java back end receives localdatetime type parameter
- [Solved] JPA sett in parameter error: Java.lang.illegalargumentexception
- Mybatis Error: All elements are null [How to Solve]
- [Solved] Error getting generated key or setting result to parameter object. UnsupportedOperationException
- JUnit tests mybatis-plus error: null pointer [How to Solve]
- [Solved] swagger Docmentation Access Error: Illegal DefaultValue 1024 for parameter type integer, java.lang.NumberFormatException
- [Solved] Openfegn Remote Call Error: java.lang.NullPointerException: null
- Not showing null elements JAVA [How to Solve]
- NULL value exception occurs when freemarker renders the page globally in the springboot project
- mybatis Error: All elements are null [How to Solve]