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
版权声明:本文标题:How to change Spring Rest generated urls to kebab case? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736767911a1951924.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论