0

Difficulties configuring additional zk.xml for testing

asked 2022-10-20 21:22:44 +0800

DennisLWL gravatar image DennisLWL
31

Hello, according to the description here it should be possible to define an additional config file.

We're not using a WEB-INF folder in the project and I've been struggling to integrate the additional config file.

Here's what I've tried so far:

  • setting the property 'org.zkoss.zk.config.path' within our 'application-local.properties' (used for testing)
  • Setting it in the main() of the Application-Class (@SpringBootApplication) via Library.setProperty(...)
  • Setting via Configuration-Class (@Configuration) with the given Profile (@Profile("local"))

I've tried different values, but nothing seemed to work.

File is located at src/main/resources/metainfo/zk/zk-local.xml

What am I doing wrong?
What is the correct path to set?
And where do I set the path?

delete flag offensive retag edit

Comments

How is it going? If my answer solves your problem, please accept the answer. :)

hawk ( 2022-11-01 09:16:13 +0800 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-10-21 14:13:43 +0800

hawk gravatar image hawk
3250 1 5
http://hawkphoenix.blogsp... ZK Team

updated 2022-10-21 14:20:40 +0800

I suppose you run spring boot in the JAR package.

org.zkoss.zk.config.path can be a path that ServletContext.getResourceAsStream() can accept, e.g.

relative to the /META-INF/resources directory of a JAR file inside the web application's /WEB-INF/lib directory

so you can put it under src/main/resources/META-INF/resources/zklocal.xml

<library-property>
    <name>org.zkoss.zk.config.path</name>
    <value>zklocal.xml</value>
</library-property>
link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2022-10-20 21:22:44 +0800

Seen: 10 times

Last updated: Oct 21 '22

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