一、pom.xml
<?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">
<parent>
<artifactId>microservice-cloud-01</artifactId>
<groupId>com.haoxiansheng.springcloud</groupId>
<version>1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>microservice-cloud-02-api</artifactId>
<packaging>pom</packaging>
</project>
二、创建实体类
package com.haoxiansheng.springcloud.entities;
import java.io.Serializable;
public class Product implements Serializable {
private Integer pid;
private String productName;
private String dbSource;
public Product() {
}
public Product(String productName) {
this.productName = productName;
}
public Product(Integer pid, String productName, String dbSource) {
this.pid = pid;
this.productName = productName;
this.dbSource = dbSource;
}
public Integer getPid() {
return pid;
}
public void setPid(Integer pid) {
this.pid = pid;
}
public String getProductName() {
return productName;
}
public void setProductName(String productName) {
this.productName = productName;
}
public String getDbSource() {
return dbSource;
}
public void setDbSource(String dbSource) {
this.dbSource = dbSource;
}
}