springboot app connects to postgres even db server is disconnected

I have a springboot app that connects to PostgreDB. here is the datasource bean

public DriverManagerDataSource createDataSourceBean(Environment env) {
    DriverManagerDataSource dataSource = new DriverManagerDataSource();

    return dataSource;

This works fine, but I wonder why even if I try to disconnect the database server via pgAdmin and then run the app my app still works. I believe I should encounter an exception when dbserver is disconnected.

I'm sure there's something weird happening . . .