As pointed out by @pebbleunit, I was using the regular jar that had not been repackaged for spring. Once I repackaged using the spring maven plugin, it started working as expected.
For future reference of anyone else running into this problem, on IntelliJ:
1. Open View > Tool Windows > Maven.
2. Expand your project and navigate to Lifecycle.
3. Double-click on package or install to build and repackage the JAR.
Or run:
mvn clean package
This should result in a jar file inside the target directory.