Yes.
It is possible to exclude package without using the basePackages filter by simply using the exclude attribute while using the @SpringBootApplication annotation.
https://www.concretepage.com/spring/spring-component-scan-include-and-exclude-filter-example