added choice condition in spring based java config