Tag Archives: Javaweb Error

[Solved] Javaweb Error: inStream parameter is null

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