Java
文章平均质量分 61
Java学习
carefree798
这个作者很懒,什么都没留下…
展开
-
Spring Boot Mybatis使用
MybatisMyBatis的前身是Apache社区的一个开源项目iBatis,于2010年更名为MyBatis。MyBatis是支持定制化SQL、存储过程以及高级映射的优秀的持久层框架,避免了几乎所有的JDBC代码和手动设置参数以及获取结果集,使得开发人员更加关注SQL本身和业务逻辑,不用再去花费时间关注整个复杂的JDBC操作过程。pom.xml <!--MyBatis配置--> <dependency> <gr原创 2022-04-09 17:46:53 · 640 阅读 · 0 评论 -
使用JdbcTemplate操作数据库中的数据
package com.example.controller;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.jdbc.core.JdbcTemplate;import org.springframework.web.bind.annotation.GetMapping;import org.springframework.web.bind.annotation.Res原创 2022-04-09 16:17:52 · 1300 阅读 · 0 评论 -
Spring Boot模板引擎Thymeleaf demo
thymeleaf 依赖pom.xml中 <!--thymeleaf模板引擎配置--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> </dependency原创 2022-04-08 18:12:11 · 624 阅读 · 0 评论 -
一个简单的SpringBoot项目 demo
架构相关代码templates目录下存放前端静态页面index.html<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>hello</title></head><body> SpringBoot的简单启动页面!</body></html>error.html原创 2022-04-05 17:37:31 · 2946 阅读 · 0 评论