简体   繁体   中英

CRUD Spring-Boot with ZK?

I want to make a web-based application using spring-boot with zk as backend and frontend, but I still haven't found a good tutorial.

Spring boot itself is a convention based framework to setup/configure an application(-server). It has examples for many ways to load/store data, each with their own tutorials, so you have to at least choose the persistence technology most suitable for your scenario ... be it spring data, jdbc, restful or nosql or webservice based ... you name it. Then someone might be able to point you to a dedicated tutorial.

From the ZK perspective all that doesn't really matter. Being a front end framework it doesn't make any persistence assumptions. Ie you can load/save data from/to any source in your controller/viewmodel code (delegating to your spring-services / repositories). Here an example project , demonstrating how a spring service can be wired and used inside MainViewModel .

Now it's up to you to decide and implement what the spring service will do, when its methods are called. For your CRUD scenario you'll most likely need methods to create, read, update and delete your data objects. Eg Spring data provides standard interfaces for that eg CrudRepository

Before you decide to use spring-data you should definitely read and understand the common concepts first. After that the integration into spring-boot should feel less mystical (we've all been there), and you can pick the options you want, instead of a tutorial someone put together - most likely under different assumptions unsuitable to your situation.

I suppose that you have fundamental skills in Java and in web development. If you do, but you are starting with spring boot I recommend starting with spring boot by reading articles in baeldung.com and mkyong.com for specific things.

To get a general perspective of spring boot I recommend that you read the book "spring boot in action" by Craig Walls:

在此处输入图像描述

You can purchase it online or find it in here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM