Picture a long truss connecting an office building to a nuclear reactor. It spins end over end. There are multiple ways to connect a non-rotating part at the middle.
One way involves an air lock. Pass through that, shut the door, and then adjust the relative rotation.
Another way involves a large and troublesome seal. I suspect this might best be done with ferrofluids to seal the gap.
Accepting a bit of air loss is another option. If the gap is tiny, it might not be bad. It would just be part of the accepted loss, just like the loss from spacewalks.
For docking, you could skip all that if you accept the complexity of docking with a spinning object. You could even dock away from the center if the rotation is slow enough.