ssm实践
三大框架整合基础
爱打瞌睡沐小白
mini沐白
展开
-
SpringMVC的请求
Service层代码编写对象Service接口对象Service接口的实现类,加@Service注解,dl注入Mapper的对象SpringMVC参数传递http://localhost:8090/findUserById?id=1原创 2021-09-24 23:50:44 · 107 阅读 · 0 评论 -
mybatis-plus整合
MP1.导入mp项目所需要的依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <原创 2021-09-24 23:19:59 · 88 阅读 · 0 评论 -
SpringBoot整合Mybatis
SpringBoot整合Mybatis1.1跳过测试类打包跳过测试类打包 <properties> <!--指定JDK版本--> <java.version>1.8</java.version> <!--跳过测试类打包--> <skipTests>true</skipTests> </properties>手动创建SpringB原创 2021-09-20 17:57:04 · 183 阅读 · 0 评论 -
SpringBoot测试类,编辑配置类
SpringBoot测试类1.1编辑配置类//作用:将自己所需的对象交给spring容器管理@Configuration//标识这是一个配置类public class UserConfig { /** * 知识点:1.Spring内部维护一个Map集合 * 2. Map集合 key/value 分别是谁??? * 3.IOC管理的对象的方式 1.@Controller等注解 2.@bean * * 1.注解组合:原创 2021-09-20 16:27:09 · 175 阅读 · 0 评论 -
@value注解的使用,yml文件和properties文件的注意事项
SpringBoot使用注意事项@Value为属性赋值msg: hello:"hello"msg.hello=hello wordController@RestController@RequestMapping("hello")public class HelloController { @Value("${msg.hello}") private String msg; @GetMapping("doGetMsg") public String doGe原创 2021-09-20 15:45:02 · 670 阅读 · 0 评论