create connection SQLException, url: jdbc:mysql://localhost:3306/fruitdb?useSSL=false&useUnicode=true&characterEncoding=utf-8, errorCode 1045, state 28000 java.sql.SQLException: Access denied for user ''@'localhost' (using password: YES)
解决方法:
图中
dataSource.setname("root");//粗心写错
改为
dataSource.setUsername("root");


