自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(13)
  • 收藏
  • 关注

原创 SpringBoot(6)数据库操作_整合Mybatis

环境准备导入依赖编写application.yml配置文件spring: datasource: username: root password: root driver-class-name: com.mysql.cj.jdbc.Driver # url: jdbc:mysql:///test?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai url: jdbc:mysql://19

2020-11-02 19:50:10 227

原创 SpringBoot(5)数据库操作_JDBC和整合Druid

SpringBoot使用JDBC使用yml文件设置数据库信息spring: datasource: username: root password: root driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://192.168.253.138:3306/jdbc?useUnicode=true&characterEncoding=utf8测试数据库连接状态 @Autow

2020-11-02 19:49:13 268

原创 SpringBoot(4)RestfulCRUD

1. 添加员工跳转到添加员工页面新建add.html,添加员工添加表单<form th:href="@{/emp}" method="post"> <div class="form-group"> <label>LastName</label> <input type="text" class="form-control" placeholder="zhangsan"> </div> <div class=

2020-11-02 19:48:49 150

原创 SpringBoot(3)登陆和thymelef抽取公共页面

1. 登陆注意:使用thymelef模版引擎时想要页面实时刷新页面需要禁用thymelef的缓存# 禁用模版引擎的缓存spring.thymeleaf.cache=false页面修改完按ctrl+F9重新编译编写LoginController完成login.html<body class="text-center"> <form class="form-signin" action="dashboard.html" th:action="@{/user/l

2020-11-02 19:48:09 305

原创 SpringBoot(2)引入资源和国际化

引入资源1. 导入静态资源将静态资源放入resources.templates中将受到模版引擎的渲染静态资源使用thymelef<html lang="en" xmlns:th="http://www.thymeleaf.org">并且在调用其他资源文件时使用thymelef标签,比如: <!-- Bootstrap core CSS --> <link href="asserts/css/bootstrap.min.css" th:href="@{/we

2020-11-02 19:47:24 248

原创 springBoot(1)thymeleaf使用和扩展springmvc

thymeleaf使用和语法1. 引入thymeleaf <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> </dependency>2. thymeleaf使用和语法@ConfigurationPropert

2020-11-02 19:46:12 258

原创 springboot入门

1. 导入依赖<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.2.10.RELEASE</version> </parent> <dependencies&gt

2020-11-02 19:44:31 98

原创 ssm框架的整合

开发环境的搭建开发环境的搭建步骤创建maven工程–webapp工程在pom.xml文件中引入坐标依赖补全maven工程目录,在Java目录下创建三层架构的文件夹需要的依赖:<properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <maven.compiler.source>1.8</maven.c

2020-10-03 13:18:11 145

原创 SpringMVC_03_常用注解

常用注解RequestParam作用:放在形参前,让形参与request参数相同属性:value,name,require(规定reuqest的参数必须为)。<%--常用注解--%> <a href="anno/testRequestParam?name=hyc">RequestParam</a>request参数为name@RequestMapping("/testRequestParam") public String testReq

2020-10-03 13:16:42 139

原创 SpringMVC_02_请求参数绑定与自定义数据类型转换器

请求参数绑定方式一:在请求路径上加上参数<%--请求参数绑定--%><a href="param/testParam?username=hyc&password=123">请求参数绑定</a>控制类中的方法上传递路径的参数,要求名字相同。@RequestMapping("/testParam") public String testParam(String username,String password){ System.ou

2020-10-03 13:14:29 205

原创 springMVC_01_环境搭建和入门程序

SpringMVC环境搭建补全目录-添加 java和resources文件夹在pom.xml中导入jar包<!-- 版本锁定 --><properties> <spring.version>5.0.2.RELEASE</spring.version> </properties><dependencies> <dependency> <groupId>org.spri

2020-10-03 13:10:40 139

原创 Mybatis逆向工程

MyBatis GeneratorMyBatis Generator 参考网站新建MyBatis Generator配置文件:MGB.xml<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis

2020-10-03 13:06:46 118

原创 Mybatis插件-分页查询

Mybatis插件-分页查询1. PageHelperPageHelper参考网站导入jar包依赖<!--PageHelper插件--> <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper</artifactId> <version>5.0.0</version&

2020-10-03 12:58:48 257

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除