簡體   English   中英

是否可以在 Spring Boot 中注入其他項目的 static 資源?

[英]Is it possible to inject static resources from other projects in Spring Boot?

例如,有一個 WEB 項目,但需要添加來自供應商的自定義 static 內容,而無需重新編譯主 jar 項目。

Is it possible to run the Spring Boot.jar file and give some argument to tell it to load other jars where different static contents are found or from code dynamically? 例如:

  • 1.jarsrc/resources/static/vendor1/
  • 2.jarsrc/resources/static/vendor2/

等等。

您需要指定一個名為loader.path的屬性。 來自Docs的報價

逗號分隔的 Classpath,例如 lib,${HOME}/app/lib。 較早的條目優先,例如 javac 命令行上的常規 -classpath。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM