net.optionfactory:rosemary

Extensions for Thymeleaf

Лицензия

Лицензия

Категории

Категории

Сеть
Группа

Группа

net.optionfactory
Идентификатор

Идентификатор

rosemary
Последняя версия

Последняя версия

1.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

net.optionfactory:rosemary
Extensions for Thymeleaf
Ссылка на сайт

Ссылка на сайт

https://github.com/optionfactory/rosemary
Система контроля версий

Система контроля версий

https://github.com/optionfactory/rosemary

Скачать rosemary

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/net.optionfactory/rosemary/ -->
<dependency>
    <groupId>net.optionfactory</groupId>
    <artifactId>rosemary</artifactId>
    <version>1.1</version>
</dependency>
// https://jarcasting.com/artifacts/net.optionfactory/rosemary/
implementation 'net.optionfactory:rosemary:1.1'
// https://jarcasting.com/artifacts/net.optionfactory/rosemary/
implementation ("net.optionfactory:rosemary:1.1")
'net.optionfactory:rosemary:jar:1.1'
<dependency org="net.optionfactory" name="rosemary" rev="1.1">
  <artifact name="rosemary" type="jar" />
</dependency>
@Grapes(
@Grab(group='net.optionfactory', module='rosemary', version='1.1')
)
libraryDependencies += "net.optionfactory" % "rosemary" % "1.1"
[net.optionfactory/rosemary "1.1"]

Зависимости

compile (3)

Идентификатор библиотеки Тип Версия
org.thymeleaf : thymeleaf jar 3.0.11.RELEASE
org.slf4j : slf4j-api jar 1.7.26
com.fasterxml.jackson.core : jackson-databind Необязательный jar 2.11.0

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12

Модули Проекта

Данный проект не имеет модулей.

Rosemary, a collection of Thymeleaf extensions

Versioned Resources

This dialect offers an attribute to handle versioning of HTML resource (js, css) for cache busting purposes.

Configuration

Just add this dialect to the Thymelaf engine, passing the desired version as a constructor parameter.

final TemplateEngine engine = new TemplateEngine();
engine.setDialects(Arrays.asList(
    ...
    new VersionedResourceDialect(version),
    ...
));

Usage

Add a version:append attribute to any tag with a src/href attribute to append a version query parameter:

<script type="text/javascript" src="/path/to/resource.js" version:append></script>

will be rendered as

<script type="text/javascript" src="/path/to/resource.js?version=xxxx"></script>

Notes:

  • if a query string is already present the version parameter will be concatenated using &
  • an already present version parameter will not be overridden
  • empty src/href attributes will not be updated
net.optionfactory

OptionFactory

Версии библиотеки

Версия
1.1
1.0