  We consider the one-dimensional Schr\"odinger equation $-f''+q_\alpha f = Ef$
on the positive half-axis with the potential $q_\alpha(r)=(\alpha-1/4)r^{-2}$.
It is known that the value $\alpha=0$ plays a special role in this problem: all
self-adjoint realizations of the formal differential expression $-\partial^2_r
+ q_\alpha(r)$ for the Hamiltonian have infinitely many eigenvalues for
$\alpha<0$ and at most one eigenvalue for $\alpha\geq 0$. We find a
parametrization of self-adjoint boundary conditions and eigenfunction
expansions that is analytic in $\alpha$ and, in particular, is not singular at
$\alpha = 0$. Employing suitable singular Titchmarsh--Weyl $m$-functions, we
explicitly find the spectral measures for all self-adjoint Hamiltonians and
prove their smooth dependence on $\alpha$ and the boundary condition. Using the
formulas for the spectral measures, we analyse in detail how the "phase
transition" through the point $\alpha=0$ occurs for both the eigenvalues and
the continuous spectrum of the Hamiltonians.
