My DAOImpl is looking like:
@Repository
public class UserDAOImpl extends JdbcDaoSupport implements UserDAO {
@Autowired
private DataSource dataSource;
@PostConstruct
private void initialize() {
setDataSource(dataSource);
}
@Override
public List<User> getUsers(String client) {
DataSource dataSource = getDsHolder().getClientDataSource(client, this.getClass().getName());
this.setDataSource(dataSource);
List<User> users = getJdbcTemplate().query(DEFAULT_SELECT_USER, new UserRowMapper());
if (users.size() > 0) {
return users;
} else {
return Collections.emptyList();
}
}
}
My DataSource class is looking like:
public BasicDataSource createClientDataSource(String clientName) {
String jdbcDriver = "com.mysql.cj.jdbc.Driver";
String jdbcUrl = env.getProperty("jdbc.url");
String jdbcUsername = env.getProperty("jdbc.user");
String jdbcPassword = env.getProperty("jdbc.password");
BasicDataSource dataSource = new BasicDataSource();
dataSource.setDriverClassName(jdbcDriver);
dataSource.setUrl(jdbcUrl + clientName + "?autoReconnectForPools=true&characterEncoding=UTF-8");
dataSource.setUsername(jdbcUsername);
dataSource.setPassword(jdbcPassword);
dataSource.setTestOnBorrow(true);
dataSource.setValidationQuery("select 1");
return dataSource;
}
And when i start my spring boot application i`m getting:
INFO 2022-02-02 15:54:35,643 [main] 263 - Unable to proxy interface-implementing method [public final void org.springframework.dao.support.DaoSupport.afterPropertiesSet() throws java.lang.IllegalArgumentException,org.springframework.beans.factory.BeanInitializationException] because it is marked as final: Consider using interface-based JDK proxies instead!
But i can't find a way how to change it to not showing this message.