Y
Y
yuki2021-10-28 17:54:23
Spring
yuki, 2021-10-28 17:54:23

Analogue of use(express node.js) for forwarding to controllers in spring?

Express has use. For example, when building an api, you can use the construction

app.use("/api/v1", какой-то контроллер или система контроллеров);
app.use("/api/v2", какой-то контроллер или система контроллеров);

If there is some similar analogue in the spring, so that you don’t have to constantly write / api / v1 or / v2 in RequestMapping?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
twolegs, 2021-10-28
@twolegs

As far as I understand, interceptors will be an analogue of express middleware in spring:
https://docs.spring.io/spring-framework/docs/curre...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question