Hi there. I am getting up to speed with Spring REST and I noticed that my id field is being appended to the end of the self URI. This is exposing an internal id which is bad practice. How do I designate the userName field as also being unique, and that is the field that should be appended to the URI? Thanks.
@Entity
data class User(
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
val id: Long,
val userName: String)