It's true that currently pathSegment expects a non-empty path segment and ignores empty ones. I don't think we should change that. You can however make a call to path after appending all path segments:
It feels a bit odd to have a property like that on UriComponentsBuilder. Are you holding on to the builder instance and re-using it? Otherwise it seems more natural to append to the URL with a call to path("/") vs setting a property such as enableTrailingSlash(true). We do have some options on the build methods (the encoded flag and a shortcut for URI vars) but I don't like the idea of further overloading the build methods with yet another boolean flag.
Could you provide a little more context about your use case and also what you mean with REST conventions for resource paths to end with a trailing slash? Maybe I'm misreading what you meant with it but should really all resource paths end with "/"?
Yet another thought might be to create your own static method that creates UriComponentsBuilder sub-class which invoke path("/") every time build is called. It sounds like that's the effect you're looking for.