qq_鏖战_0
2021-10-13 01:16
@SpringBootApplication(scanBasePackages = {"com.glshopproject"}) @RestController @MapperScan("com.glshopproject.dao") public class App { @Autowired private UserDOMapper userDOMapper; @RequestMapping("/") public String home() { UserDO userDO= userDOMapper.selectByPrimaryKey(1); if (userDO==null) {return "用户对象不存在";} else{ return userDO.getName(); } } public static void main( String[] args ) { System.out.println( "Hello World!" ); SpringApplication.run(App.class,args); } }
application.properties文件有单词拼错,低级错误,嘤嘤嘤
SpringBoot构建电商基础秒杀项目
49019 学习 · 954 问题
相似问题