8000 Release v1.3.0 · jstachio/jstachio · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

v1.3.0

Compare
Choose a tag to compare
@agentgt agentgt released this 09 Aug 19:53
· 214 commits to main since this release

1.3.0 Feature Release

See all the 1.3.0 issues

The most important feature added is #168 Context Aware Templates.

This feature took extensive work and Spring MVC supports it OOB. In Spring this will allow you to access
model attributes like.

{{@context.someModelAttribute}}

@context is like a Map so you do loose some type safety when using it but this will allow models to stay immutable. You can use lambdas to pull contents out of a context and cast it.

@JStacheLambda
public Locale findLocale(ContextNode node) {
  return (Locale) node.get("locale");
}
{{@context.findLocale}}
{{country}} {{! call Locale.getCountry }}
{{/@context.findLocale}}

Potential breaking changes

There is a very very minor chance this release will break if you extended:

  • JStachioFilter
  • ContextNode

It was decided not to make a major version since it was documented that those interfaces are rather internal.

Regardless it is best to rerun the annotation processor on all models before upgrading the runtime.

Deprecation

The JMustache extension has been sadly deprecated. While it did work for simple stuff it was too misleading to be trusted.
We are actively looking for newer/better hot reload #187 . Stay tuned and thumb-up if hot reload is a pain point.

What's Changed

Full Changelog: v1.2.1...v1.3.0

0