Is there a way to retrieve information about spring mappings defined by @Controller?

后端 未结 2 1560
误落风尘
误落风尘 2021-02-06 07:47

I\'d like to be able to create a page that lists off the mappings that were discovered by controllers annotated with @Controller. I\'m doing this for REST services

2条回答
  •  忘掉有多难
    2021-02-06 08:03

    Check out this custom doclet https://github.com/rightshift/spring-mvc-api-doclet. It will create endpoint documentation for all Spring MVC @Controller annotated classes. Custom templates can be created to produce different HTML output. The new template name just needs to be passed as an optional param. It can also be added to as a reportSet to the reporting section of your maven pom.

提交回复
热议问题