客户端接口编写

master
Qin Dong Ming 2024-08-29 20:04:57 +08:00
parent 6477721bc1
commit 623bc6615f
5 changed files with 89 additions and 1 deletions

View File

@ -0,0 +1,23 @@
package com.muyu.controller;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Authorqdm
* @Packagecom.muyu.controller
* @Projectcloud-etl-engine
* @nameStudent
* @Date2024/8/29 19:53
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Student {
private Integer id;
private String name;
private Integer age;
}

View File

@ -0,0 +1,39 @@
package com.muyu.controller;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Component;
/**
* @Authorqdm
* @Packagecom.muyu.controller
* @Projectcloud-etl-engine
* @nameTest
* @Date2024/8/29 19:54
*/
@Component
@Log4j2
public class Test {
public static void main(String[] args) {
Student student = new Student();
student.setName("张");
if (student.getName().length()<2|| student.getName().length()>16){
throw new RuntimeException("名称不合法");
}
student.setName("");
if (student.getAge()<1 || student.getAge()>120){
throw new RuntimeException("名称不合法");
}
student.setAge(200);
}
}

View File

@ -1,6 +1,5 @@
package com.muyu.service.serviceImpl; package com.muyu.service.serviceImpl;
import com.muyu.controller.EngineLevelController;
import com.muyu.domain.EngineLevelEntity; import com.muyu.domain.EngineLevelEntity;
import com.muyu.domain.constants.Result; import com.muyu.domain.constants.Result;
import com.muyu.mapper.EnginLevelMapper; import com.muyu.mapper.EnginLevelMapper;

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.muyu</groupId>
<artifactId>cloud-etl-engine</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>elt-data-access</artifactId>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.muyu</groupId>
<artifactId>cloud-common-core</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -20,6 +20,7 @@
<module>cloud-etl-common</module> <module>cloud-etl-common</module>
<module>cloud-etl-remote</module> <module>cloud-etl-remote</module>
<module>cloud-etl-server</module> <module>cloud-etl-server</module>
<module>elt-data-access</module>
</modules> </modules>
<properties> <properties>
<maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.source>1.8</maven.compiler.source>