Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/webpack/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 使用Spring Boot将@WebInitParam中的值外部化_Java_Spring Boot_Jgit - Fatal编程技术网

Java 使用Spring Boot将@WebInitParam中的值外部化

Java 使用Spring Boot将@WebInitParam中的值外部化,java,spring-boot,jgit,Java,Spring Boot,Jgit,我正在使用SpringBoot创建一个GitHTTP服务器。代码如下 @WebServlet(name=“GitServlet”,urlPatterns={”/git/*”},loadOnStartup=1, initParams={ @WebInitParam(name=“base path”,value=“/var/repos”), @WebInitParam(name=“全部导出”,value=“true”) }) 公共类GitServlet扩展org.eclipse.jgit.http.

我正在使用SpringBoot创建一个GitHTTP服务器。代码如下

@WebServlet(name=“GitServlet”,urlPatterns={”/git/*”},loadOnStartup=1,
initParams={
@WebInitParam(name=“base path”,value=“/var/repos”),
@WebInitParam(name=“全部导出”,value=“true”)
})
公共类GitServlet扩展org.eclipse.jgit.http.server.GitServlet{
}
我想将servlet init参数
基本路径
值(
/var/repos
)放入Spring配置文件
application.yml
,但找不到执行此操作的方法。 是否可以将
@WebInitParam
中的值外部化