摘要: 1:修改pom.xml 将“jar”改为“war” <packaging>war</packaging> 将: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</ 阅读全文
posted @ 2020-12-08 17:35 dcrenl 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 一:使用@CrossOrigin注解 @CrossOrigin @RequestMapping(value = "/get") public HashMap<String, Object> get(@RequestParam String name) { HashMap<String, Object 阅读全文
posted @ 2020-12-08 17:22 dcrenl 阅读(138) 评论(0) 推荐(0) 编辑
摘要: import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springfra 阅读全文
posted @ 2020-12-08 17:06 dcrenl 阅读(150) 评论(0) 推荐(0) 编辑
摘要: spring boot 创建项目引用mybatis后,直接运行会提示: Cannot determine embedded database driver class for database type NONE 因为springboot启动时会自动注入数据源 使用@SpringBootApplic 阅读全文
posted @ 2020-12-08 16:55 dcrenl 阅读(68) 评论(0) 推荐(0) 编辑