package com.example.VEEProject.bean;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import lombok.Getter;
import lombok.Setter;
@Entity
@Table(name = "veedata")
public class VeeData {
@Id
@GeneratedValue
private int id;
@Column(name = "PESTLE category")
@Getter
@Setter
private String PestleCategory;
@Column(name = "Issue title")
@Getter
@Setter
private String IssueTitle;
@Column(name = "Issue description")
@Getter
@Setter
private String IssueDescription;
@Column(name = "Issue type")
@Getter
@Setter
private String IssueType;
@Column(name = "Implications")
@Getter
@Setter
private String Implications;
@Column(name = "Impact zone")
@Getter
@Setter
private String ImpactZone;
@Column(name = "Risk area")
@Getter
@Setter
private String RiskArea;
@Column(name = "Time horizon")
@Getter
@Setter
private String TimeHorizon;
@Column(name = "Response")
@Getter
@Setter
private String Response;
@Column(name = "Related entries")
@Getter
@Setter
private String RelatedEntries;
@Column(name = "Related themes")
@Getter
@Setter
private String RelatedThemes;
@Column(name = "Further reading name")
@Getter
@Setter
private String FurtherReadingName;
@Column(name = "Further reading link")
@Getter
@Setter
private String FurtherReadingLink;
}
请问 springboot 后端中如何写一个根据id和变量名查询变量的值的接口,又如何用postmanAPI做测试?变量名在上方的代码里。
package com.example.VEEProject.dao;
import org.springframework.data.jpa.repository.JpaRepository;
import com.example.VEEProject.bean.VeeData;
public interface VeeDataDao extends JpaRepository<VeeData, Integer> {
}