Replace your bean definition with the id ds
with one that defines the DataSource you want to use. For Hakari see this SO post -> https://stackoverflow.com/a/24500712/1585136.
You shouldn't need to do anything with Tomcat, so remove anything you were doing and just let CF & the Java buildpack configure that for you.
You also don't need to do anything CF specific with your datasource. You can plug in the configuration values it needs using a property place holder and resolve them from a properties file included with your app.
If, and only if you want since it's not a requirement, you can look at service binding to make managing configuration data easier. When doing this, you would create a service instance in CF, bind that to your app and then CF would provide your app with the configuration for that service. When this happens, you don't need to bundle the service configuration with your app, it dynamically adjust to the service that is bound to your app.
To get started with service binding, read the docs here -> https://docs.cloudfoundry.org/buildpacks/java/configuring-service-connections/spring-service-bindings.html
There are a variety of ways you can do service binding and the link above covers them all with examples. I would recommend using a combination of the "cloud" profile & cloud property placeholders, or using the "Manual Configuration" section. Skip the auto reconfiguraton. It sounds tempting but beyond some demo flash, it's more trouble than it's worth.
Hope that helps!