Building secondary Development Environment Based on CrUDAPI Back-end Java SDK (I)

background

At present, the Java API services of crUDAPI interface system are all available. In order to meet complex scenarios, the secondary development can be carried out by integrating Java SDK to meet actual business requirements.

Environment set up

Install the JDK

Website www.oracle.com/java/techno… Download Java SE 8, Java SE 8U281 is the latest release for the Java SE 8 Platform.

java -version
java version "1.8.0 comes with _241"
Copy the code

Install maven

Download the latest stable version from maven.apache.org and install it. Verified version 3.6 is available.

MVN -v Apache Maven 3.6.3Copy the code

Download the demo

Making the address

Github.com/crudapi/cru…

Gitee address

Gitee.com/crudapi/cru…

GitHub may be slow due to network reasons. Instead, access Gitee and the code will be updated synchronously.

Install the Jar package locally

MVN install: install-file-dfile =./lib/crudapi-core-1.0.0. jar-dgroupid = cn.crudapi-dartifactid =crudapi-core -dversion = 1.0.0-dpackaging =jar MVN install: install-file-dfile =./lib/crudapi-api-1.0.0.jar -dgroupid =cn - DartifactId = crudapi - API - Dversion = 1.0.0 - Dpackaging = jarCopy the code

Importing a database

./mysql/crudapi.sql

Configuring database Information

./src/main/resources/application.properties

spring.datasource.url=jdbc:mysql://localhost:3306/crudapi? serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true
spring.datasource.username=root
spring.datasource.password=root
Copy the code

compile

mvn clean install -Dmaven.test.skip=true
Copy the code

run

Java - jar. / target/crudapi - example - 1.0.0. JarCopy the code

Swagger document

http://127.0.0.1:8888/swagger-ui.html

User name and password

superadmin
1234567890
Copy the code

Crudapi Back-end management WEB

Making the warehouse

Github.com/crudapi/cru…

Gitee warehouse

Gitee.com/crudapi/cru…

Modify the configuration

Modify devServer->proxy->target in quasar.conf.js

devServer: {
  https: false.port: 8080.open: true.// opens browser window automatically
  proxy: {
    "/api/*": {
      target: "http://127.0.0.1:8888".changeOrigin: true}}}Copy the code

summary

This article mainly introduces the Java SDK integration mode of CrUDAPI background. After the demo is run, it can be used either directly or for secondary development. The application scenario of secondary development in the following details will be introduced according to the actual case.

Attached the demo presentation

Main functions: metadata management, serial number management, table relationship setting, cruD add, delete, modify and check service data, etc.

Forms correspond to different objects

Table diagrams show the relationships between different objects

Service Data Operation

Website address: crudapi. Cn test address: demo. Crudapi. Cn/crudapi/log…