To beat the slime boss:
Avoid the bubbles until he appears, then whack him for a couple of seconds and get out of the way. If you move above him you won't be able to hit him, and I think there might be a special spot below him where you can hit him but he can't hit you.
To beat the final boss:
Get up nice and close so he won't use ranged attacks, then keep whacking him. Make sure you use the forward flip attack when he's charging so that you'll be behind him when he strikes. It takes a while and it's easy to make mistakes, so it's a good idea to max out your inventory beforehand.