added annotation based and java based configurations