Spring boot webjars: unable to load javascript library through webjar

后端 未结 7 1330
失恋的感觉
失恋的感觉 2020-12-30 08:37

I have a spring boot (I use Thymeleaf for templating) project where I want to use some jQuery libraries.

Unfortunately, the webjars aren\'t loading at all. I have tr

7条回答
  •  不知归路
    2020-12-30 09:05

    Additional answer found on one blog:

    When using Spring Framework version 4.2 or higher, it will automatically detect the webjars-locator library on the classpath and use it to automatically resolve the version of any WebJars assets.

    In order to enable this feature, we’ll add the webjars-locator library as a dependency of the application:

    
        org.webjars
        webjars-locator
        0.30
    
    

    In this case, we can reference the WebJars assets without using the version; (...)

提交回复
热议问题