use two ways to config beans. ps:this is a simple example to help understand Spring and Maven