With the assumption that the bending rigidity of a non-uniform beam is second-order differentiable with respect to the axial coordinate variable, the exact solution of the static deflection of a non-uniform Bernoulli-Euler beam with general elastically restrained boundary conditions is developed in closed integral form. The Green's functions for the beam with various kinds of loading and boundary conditions are presented and expressed in terms of the four normalized fundamental solutions of the system. Examples are given to illustrate the analysis.