The present invention provides a recombinant yeast system for expressing the glycoprotein E2 of classical swine fever virus (CSFV), in which the expression level of yE2 is improved by codon optimization and shortening coding region of E2 gene. The truncated E2 subunits are used as major active ingredient in anti-CSFV vaccines and useful diagnostic blocking ELISA kits for CSFV infection with easy manipulation and low cost.