Configure beans with Java