javaWeb之WebJars

40 阅读1分钟

是什么

WebJars是将Web前端Javascript和CSS等资源打包成Java的jar包!

With any Servlet 3 compatible container, the WebJars that are in the WEB-INF/lib directory are automatically made available as static resources. This works because anything in a META-INF/resources directory in a JAR in WEB-INF/lib is automatically exposed as a static resource.

在Servlet 3的容器中,位于WEB-INF/lib目录下的WebJars会自动作为静态资源提供。这是因为位于WEB-INF/lib目录下的JAR文件中的META-INFO/resources目录下的所有内容都会被暴露为静态资源。

WebJars 是 Java 开发者管理前端依赖的强大工具