摘要:
有关MyBatis的配置与使用 虽然Spring Data JPA在国外广泛流行,但是在国内仍是MyBatis使用更加普遍 整合MyBatis 第一步:新建Spring Boot项目,在pom.xml中引入MyBatis的Starter以及MySQL Connector依赖,具体如下: <depen 阅读全文
摘要:
关于HikariCP和Druid连接池 HiKariCP 代码体积小; 速度快; 稳定性高; 可靠性高; 支持 jmx监控; spring boot 默认数据源; Druid 阿里开源; 功能较全面、拓展性好; 支持 jmx/log/http监控; 支持sql拦截及解析; 代码体积中等; 运行速度中 阅读全文
摘要:
注解注入(Field 注入): 使用@Autowired注解 最常见、最简单、代码最简洁,不推荐 @Controller public class HelloController { @Autowired private AlphaService alphaService; @Autowired p 阅读全文