admin管理员组

文章数量:1131235

By default Spring Rest generates endpoints in camel case. So, for example,

@Entity
@Data
public class UserName {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    private String name;
public interface UserNameRepository extends JpaRepository<UserName, Long> {
    boolean existsByName(String name);
}

will generate a bunch of exposed endpoints including basepath/userNames/search/existsByName, while I would like to have it in kebab case to comply with REST practises.

Am I missing something?

I can annotate all repositories with @RepositoryRestResource and methods with @RestResource and provide a name there, yet this does not feel like a good solution.

Also tried to override configureRepositoryRestConfiguration - did not help.

本文标签: How to change Spring Rest generated urls to kebab caseStack Overflow