SpringBoot启动访问地址时总是报404
问题如图:

解决1:

启动类要放在外面,也就是包含所有子包,不能放在freshfoodmall中
解决2:
如果启动类在freashfoodmall,在启动类上添加@SpringBootApplication(scanBasePackages="controller"),指定controller的位置
问题如图:

解决1:

启动类要放在外面,也就是包含所有子包,不能放在freshfoodmall中
解决2:
如果启动类在freashfoodmall,在启动类上添加@SpringBootApplication(scanBasePackages="controller"),指定controller的位置