migrate to spring 4 and add dao layer

migrate to spring 4 and add dao layer.