-
FEATURED COMPONENTS
First time here? Check out the FAQ!
From the documentation from the zpspringboot project, it appears that the only differences between a war file and a springboot jar file deployments are the <packaging> tag in the pom.xml and the property "zk.springboot-packaging" in the application.properties.
According to the documentation : General resource folders are: src/main/resources/static Spring Boot's resource folder src/main/resources/web ZK's class-web-resource folder
This appears to work for for the spring jar file deployment. However, when I try the war file deployment it appears to look in the main/webapp dir instead. So it appears I am not understand the view resolvers. I am also not totally clear on the need for the @GetMapping methods.
for example, I took the file "minimal.zul" from the example program. I added a mapping
@GetMapping("/minimal")
public String minimal() {
return "minimal";
}
I placed the file in the /src/main/webapps it works file. If I place in the /src/main/resources/web the browser displays /minimal.zul
So I guess the question is : Is there a configuration that would allow war file deployments to load zul files from /src/main/resource/web (instead of /src/main/webapp) like spring boot jar file deployments?
If the packaging is jar, there is no context folder, so you need to put zul under src/main/resources/web
. We follow spring boot's way.
But if the package is war, then you should put zul files under src/main/webapp
(Java EE specification). To load a file in src/main/resources/web
with this packaging, please refer to
Classpath Web Resource Path. By default, there is no way to directly visit a zul under Classpath Web Resource Path with a browser.
Asked: 2023-01-05 23:16:21 +0800
Seen: 13 times
Last updated: Jan 10
bug with intboxes on mobile devices
zk keikai-how to add custom button/label to formulabar?
zk-keikai- update multiple cells parallel at same time asynchronously
zk-keikai-How to auto fit column width based on text
zk-keikai-ClipboardPateEvent-called twice
Reference a spring bean from VariableResolver