Nathan Feger
Nathan Feger

Reputation: 19496

How do I limit the classes that are securable by spring security?

I have noticed that the startup time on my app is getting brutally slow. One problem is that spring security is scanning the entire classpath including my dependant jars for classes that might be annotated with secure annotations. As the maintainer of this code, I feel confident only my particular package 'com.company' will need to be secured? Is this an option in spring?

Upvotes: 2

Views: 73

Answers (1)

Niklas Herder
Niklas Herder

Reputation: 131

Have you defined a base-package in your Spring config?

<context:component-scan base-package="com.yourcompany"/>

Upvotes: 1

Related Questions