External library folder for Spring Boot

前端 未结 3 2180
-上瘾入骨i
-上瘾入骨i 2021-02-19 05:23

I wonder how to externalize all jdbc drivers for my Spring Boot applications, I would not like to insert jdbc drivers into my fat jar once the application is built.

Is t

3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-19 06:16

    See the documentation about PropertiesLauncher:

    • https://docs.spring.io/spring-boot/docs/current/reference/html/executable-jar.html#executable-jar-property-launcher-features

    Looks like you can use the loader.path property to define a lib folder location, containing jars to load - in fact the lib folder (inline with the jar) is the default location:

    loader.path (if empty) defaults to lib (meaning a local directory or a nested one if running from an archive)

提交回复
热议问题