Hi Iveta,
Thanks a lot for your message.
I remember having seen such problems in the past on some community channels. I'm not sure why this scanning is so slow, you could probably profile it and report bugs to Spring. Surely, they're doing something inefficient, it shouldn't take this long (7 minutes!) Maybe, they're not taking into account the possibility of complex type hierarchies like jOOQ's where the hierarchy graph is very complex?
As a workaround, you should configure Spring not to scan jOOQ types. Your approach seems viable as a workaround. A better approach might be to exclude all org.jooq packages as a whole, because there are other entry points into the jOOQ API than DSLContext.
But again, a thorough fix can only be expected if Spring addresses whatever they're not doing correctly. You're probably not the only ones having this problem.
Best Regards,
Lukas