I use database.properties to save my database information. However, it pop up this error, every time I run the code. I don't know which part of the database is wrong. Please help!
host: 127.0.0.1
port: 3306
database: spider
username: root
password: !QAZxsw2
driver: com.mysql.cj.jdbc.Driver
drivertype: MYSQL
ERROR Database:40 - java.sql.SQLNonTransientConnectionException: Cannot load connection class because of underlying exception: com.mysql.cj.exceptions.WrongArgumentException: Failed to parse the host:port pair '127.0.0.1:3306;databaseName=spider;user=root;password=!QAZxsw2;serverTimezone=UTC&'.
String connString = String.format("jdbc:%s://%s:%s;databaseName=%s;user=%s;password=%s;serverTimezone=UTC&", drivertype, host, port, database, username, password);as my connection string.&is that "There are multiple params that need to be separated by &, but & is changed to &"&isn't&and is irrelevant if no other parameter after. You should add more info to question