集成 Spring HATEOAS(失败)
1. 引入 Maven 依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-hateoas</artifactId>
</dependency>2. 实体类继承 RepresentationModel
package com.study.cloudlearning.entity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.hateoas.RepresentationModel;
/**
* @author Zhang B H
* @create 2023-10-26 10:13
*/
@Getter
@Setter
@ToString
public class License extends RepresentationModel<License> {
private int id;
private String licenseId;
private String description;
private String organizationId;
private String productName;
private String licenseType;
}
3. 修改Controller控制器
Last updated