1.直接在Controller类中添加主类启动
2.将所有的Controller集中放置在App类中:必须要添加一个包扫描的注释: @ComponentScan(basePackages={" “,” "}