search

Home  >  Q&A  >  body text

java - Spring boot project can directly display all interface addresses and data information through ip+port+contentPath. Why is this???

Start the spring boot project locally, the configuration information is as follows

Entering localhost:8082/v1 in Google browser will display the following data

All interface addresses in the project will be displayed.
Why is this and how does this happen???

世界只因有你世界只因有你2778 days ago833

reply all(2)I'll reply

  • 大家讲道理

    大家讲道理2017-05-17 10:08:35

    I found the problem because I added a spring-boot-starter-data-rest dependency

    Just remove this dependency.

    reply
    0
  • 为情所困

    为情所困2017-05-17 10:08:35

    Personal feeling, don’t complain if it’s wrong
    If you are using idea, you can put a breakpoint in DispatcherServlet, either doService or doDispatch.
    Then you can see the internal properties of DispatcherServlet. Personally, I feel that it is in the handlerMappings property. There are definitions. In this pile of things, you can find the uri that spring handles for you
    After that, it’s up to you how to look at it

    reply
    0
  • Cancelreply