Constructing quantum observables and self-adjoint extensions of symmetric operators. III. Self-adjoint boundary conditions