如何在SpringBoot中配置其他类路径? [英] How to configure additional classpath in SpringBoot?

查看:813
本文介绍了如何在SpringBoot中配置其他类路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想制作一个独立的Web应用程序.我在SpringBoot上遇到一些问题.

I want to make a standalone web application. I have some problems with SpringBoot.

我的应用程序是SpringBoot中的一个jar文件.

My application is one jar file from SpringBoot.

但是我的应用程序通常是需要jdbc驱动程序jar的.我想为我的应用程序排除jdbc驱动程序jar,然后从lib文件夹中读取库jar.

But my application was usually needed jdbc driver jar. I want to exclude the jdbc driver jar for my application and read the library jar from the lib folder.

但是SpringBoot的lib文件夹是BOOT-INF/libfinal static.因此,我想为jdbc驱动程序jar添加外部类路径(lib).

But SpringBoot lib folder is BOOT-INF/lib is final static. So, I want to add external classpath (lib) for the jdbc driver jar.

如何在SpringBoot中配置其他类路径.有空吗?

How to configure additional classpath in SpringBoot. Is it available?

推荐答案

您可以在Spring Boot中引用以下链接:

You may refer this below link from spring boot:

您可以使用loader.path属性定义一个lib文件夹位置

You can use the loader.path property to define a lib folder location

这篇关于如何在SpringBoot中配置其他类路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆