Knot.x 1.4.0
Release Notes
knotx-core
- PR-427 - HttpRepositoryConnectorProxyImpl logging improvements
- PR-422 - Configurable Handlebars delimiters
- PR-428 - Mark all Service Knot related classes deprecated.
- PR-432 - Port unit and integration tests to JUnit 5
- PR-440 - Enable different Vert.x Config stores types fix.
- PR-443 - Update maven plugins versions.
- PR-445 - Vert.x version upgrade to 3.5.3
- PR-458 - Remove unused StringToPattern function
knotx-dependencies
- PR-2 - JUnit 5 libraries added
- PR-7 - Configure Knot.x Data Bridge in BOM file
- PR-9 - Updated JUnit, added Apache Collections v4 and AssertJ versions
- PR-10 - Vert.x version upgraded to 3.5.3
knotx-junit5
First release of the Knot.x Junit5 module that enables full support for Junit5 in Knot.x tests.
knotx-data-bridge
First release of the Knot.x Data Bridge module that replaces old Knot.x Service Knot (which is now deprecated and will be removed soon).
knotx-stack
- PR-5 - Knot.x Data Bridge introduced instead of Service Knot
- PR-18 - Introduced Junit5 and integration tests module
- PR-25 - Fixed http repo headers conifg
knotx-example-project
- PR-19 - Fixed http repo headers conifg
Upgrade Notes
Replace Service Knot
with Data Bridge Knot
Notice! You may still use old
Service Knot
with Knot.x 1.4 if you want In order to start using Knot.x with Data Bridge do following changes:
Configuration files
- In your main config, update
modules
section from:"serviceKnot=io.knotx.knot.service.ServiceKnotVerticle" "serviceAdapter=io.knotx.adapter.service.http.HttpServiceAdapterVerticle"
to
"dataBridge=io.knotx.databridge.core.DataBridgeKnot"
"dataSourceHttp=io.knotx.databridge.http.HttpDataSourceAdapter"
- Define Data Bridge constants in the
global
section ofapplication.conf
:# Data Bridge globals bridge { address = knotx.knot.databridge dataSource { http.address = knotx.bridge.datasource.http } }
- nstead including
serviceKnot.conf
andserviceAdapter.conf
change includes todataBridge.conf
anddataSourceHttp.conf
. You will find examples of those files inknotx-stack distribution
. - Move all your
services
definitions fromserviceKnot.conf
todataDefinitions
indataBridge.conf
. - Move all your
services
definitions fromserviceAdapter.conf
todataSourceHttp.conf
.
Refer to example application.conf in the Knot.x Stack project.
Page templates
Alter all Knot.x snippets in your repository.
- Update
data-knotx-knots
values fromservices
todatabridge
. - Update data bindings from
data-knotx-service-${NAMESPACE}
todata-knotx-databridge-name-${NAMESPACE}
. - Update data params from
data-knotx-params-${NAMESPACE}
todata-knotx-databridge-params-${NAMESPACE}
.
If you use custom param-prefix (default is data-knotx-
), you may also set them for Knot.x Data Bridge module.
Custom adapters upgrade
If you implemented your own Service Adapter (by implementing
io.knotx.proxy.AdapterProxy
refactor it to implement
io.knotx.databridge.api.DataSourceAdapterProxy.java
instead.
Tests update
Knot.x 1.4 comes with JUnit 5 support. Instead of including knotx-core
start using knotx-junit5
.
Instead of using @RunWith(VertxUnitRunner.class)
use extension @ExtendWith(KnotxExtension.class)
.
Also you don't need those any more:
private RunTestOnContext vertx = new RunTestOnContext();
private TestVertxDeployer knotx = new TestVertxDeployer(vertx);
@Rule
public RuleChain chain = RuleChain.outerRule(vertx).around(knotx);
Just annotate your tests with @KnotxApplyConfiguration("path-to-config")
instead of @KnotxConfiguration("path-to-config")
.
You may find example of migrating Knot.x JUnit tests in those PRs:
Fix Http Repository
headers wildcards
In the Http Repository configuration update allowedRequestHeaders
section.
*
is no longer a wildcard, now regexp are allowed so e.g. change any:
allowedRequestHeaders = [
"Accept*"
...
]
to
allowedRequestHeaders = [
"Accept.*"
...
]
All regular expressions are supported.