Home > Enterprise >  Replace ControllerLinkBuilder in latest Spring HateOAS
Replace ControllerLinkBuilder in latest Spring HateOAS

Time:05-09

I have a old project with the following Spring hateoas import dependency:

import org.springframework.hateoas.mvc.ControllerLinkBuilder;

Do you know into the latest version how I can replace this import?

CodePudding user response:

There is a class WebMvcLinkBuilder. It's used like

linkTo(OrderController.class).slash(order.getOrderId()).withSelfRel();
  • Related