Revision history [back]

click to hide/show revision 1
initial version

answered 2021-03-25 10:48:31 +0800

cor3000 gravatar image cor3000

ZK Team

I personally try to avoid restarts by using DCEVM (or JRebel if available) however if that's not an option the devtools restart needs to be configured to include the ZK jars during a restart. The functionality is documented here:

https://docs.spring.io/spring-boot/docs/1.5.x/reference/html/using-boot-devtools.html#using-boot-devtools-customizing-classload

A simple config I found working on my side is to add the following:

src/main/resources/META-INF/spring-devtools.properties

restart.include.zklibs=/z[\\w]+-[\\w\\d-\.]+\.jar

it will ensure jars starting with z such as zk-9.5.1.jar or zul-9.5.1.jar are reloaded since ZK relies on static initializers. This is necessary. You might have to customize the regex to exclude non-zk jars also starting with z.

I personally try to avoid restarts by using DCEVM (or JRebel if available) however if that's not an option the devtools restart needs to be configured to include the ZK jars during a restart. The functionality is documented here:

https://docs.spring.io/spring-boot/docs/1.5.x/reference/html/using-boot-devtools.html#using-boot-devtools-customizing-classload

A simple config I found working on my side is to add the following:

src/main/resources/META-INF/spring-devtools.properties

restart.include.zklibs=/z[\\w]+-[\\w\\d-\.]+\.jar

it will ensure jars starting with z such as zk-9.5.1.jar or zul-9.5.1.jar are reloaded since during restart.

This is necessary, because ZK relies on static initializers. This is necessary. initializers - e.g. to load the label properties.

You might have to customize the regex to exclude non-zk jars also starting with z.

I personally try to avoid restarts by using DCEVM DCEVM (or JRebel if available) however

However if that's not an option the devtools restart needs to be configured to include the ZK jars during a restart. The This spring-boot-devtools functionality is documented here:

https://docs.spring.io/spring-boot/docs/1.5.x/reference/html/using-boot-devtools.html#using-boot-devtools-customizing-classload

A simple config I found working on my side is to add the following:

src/main/resources/META-INF/spring-devtools.properties

restart.include.zklibs=/z[\\w]+-[\\w\\d-\.]+\.jar

it will ensure jars starting with z such as zk-9.5.1.jar or zul-9.5.1.jar are reloaded during restart.

This is necessary, because ZK relies on static initializers - e.g. to load the label properties.

You might have to customize the regex to exclude non-zk jars also starting with z.

I personally try to avoid restarts by using DCEVM (or JRebel if available)

However if that's not an option the devtools restart needs to be configured to include the ZK jars during a restart. This spring-boot-devtools functionality is documented here:

https://docs.spring.io/spring-boot/docs/1.5.x/reference/html/using-boot-devtools.html#using-boot-devtools-customizing-classloadhttps://docs.spring.io/spring-boot/docs/current/reference/html/using-spring-boot.html#using-boot-devtools-customizing-classload

A simple config I found working on my side is to add the following:

src/main/resources/META-INF/spring-devtools.properties

restart.include.zklibs=/z[\\w]+-[\\w\\d-\.]+\.jar

it will ensure jars starting with z such as zk-9.5.1.jar or zul-9.5.1.jar are reloaded during restart.

This is necessary, because ZK relies on static initializers - e.g. to load the label properties.

You might have to customize the regex to exclude non-zk jars also starting with z.

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More