开发者

Minimizing SpringLdap dependencies

开发者 https://www.devze.com 2022-12-29 02:05 出处:网络
I would like to use SpringLDAP to do some simple username/password verification for authentication purposes. WHile the actual jar file is quite small (less than 1 meg) it seems to have a lot of depend

I would like to use SpringLDAP to do some simple username/password verification for authentication purposes. WHile the actual jar file is quite small (less than 1 meg) it seems to have a lot of dependencies as listed by link text.

By alot i mean it seems to suck in over 50 things many which dont seem right such as spring-jdbc as I dont want any jdbc a开发者_运维百科nd only the ldap template class and its bare dependencies. Without wasting too much time is it possible to the spring-ldap with only a bare minimum number of dependencies which amount to something like:

  • spring core
  • spring ldap
  • whatever logging deps they require.
  • spring tx

I dont see or appreciate why the rest of thes tuff is reuqired and was wondering can anyone verify they arent really needed in the end if one sticks to the basics. The other stuff i am referring too include:

  • spring-orm // no jdbc
  • beans // i dont want ioc.
  • spring-aop // no need for aop.

I intend to wire up the beans i will be using manually. I dont want more crap in there for what ammounts to setting a few properties, and want confirmation that I dont need what is probably there just to do the ioc stuff when all i want is the ldap stuff.


At lot of the things that are sucked in are transitive dependencies - dependencies of the things that spring-ldap relies upon. You can explicity exclude these when declaring your dependencies using the exclusions tag in the dependency.

<dependency>
    <groupId>org.springframework.ldap</groupId>
    <artifactId>spring-ldap</artifactId>
    <version>1.3.1.RELEASE</version>
    <exclusions>
        <exclusion>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
        </exclusion>
        <!-- other exclusions here -->
    </exclusions>
</dependency>  
0

精彩评论

暂无评论...
验证码 换一张
取 消