Facile synthesis and catalytic property of spinel ferrites by a template method