Application of nuclear density functional theory to exotic nuclei