use javaConfig instead of Xml