客户端接口编写
parent
6477721bc1
commit
623bc6615f
|
@ -0,0 +1,23 @@
|
|||
package com.muyu.controller;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @Author:qdm
|
||||
* @Package:com.muyu.controller
|
||||
* @Project:cloud-etl-engine
|
||||
* @name:Student
|
||||
* @Date:2024/8/29 19:53
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class Student {
|
||||
private Integer id;
|
||||
private String name;
|
||||
private Integer age;
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
package com.muyu.controller;
|
||||
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @Author:qdm
|
||||
* @Package:com.muyu.controller
|
||||
* @Project:cloud-etl-engine
|
||||
* @name:Test
|
||||
* @Date:2024/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);
|
||||
|
||||
}
|
||||
}
|
|
@ -1,6 +1,5 @@
|
|||
package com.muyu.service.serviceImpl;
|
||||
|
||||
import com.muyu.controller.EngineLevelController;
|
||||
import com.muyu.domain.EngineLevelEntity;
|
||||
import com.muyu.domain.constants.Result;
|
||||
import com.muyu.mapper.EnginLevelMapper;
|
||||
|
|
|
@ -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>
|
Loading…
Reference in New Issue