Checkout this link. https://github.com/spring-projects/spring-boot/pull/15609#issuecomment-2250236409 Some fixes here, though with some risks( read the comments in that link) I was able to get the URLs properly after implementing that fix.