Declare bean programmatically