
Spring Boot
文章平均质量分 55
一身都是月儿
发博客论文,走算法人生
展开
-
Cocos creator连接SpringBoot简单实现Get请求
TypeScript脚本中添加点击事件 onClick(){ this.get('/getInt?id=1',(res)=>{ if(res){ this.label.string=res; }else { Toast('网络连接异常'); } }) } get(url, callback,se.原创 2022-05-14 12:39:30 · 720 阅读 · 0 评论 -
SpringBoot+Mybatis+Thymeleaf+SQL Server整合实现增删改查
springboot+mybatis+SQL Server整合templates文件下创建html文件<!DOCTYPE html><html lang="en" xmlns:th="http://www.thymeleaf.org"><head> <meta charset="utf-8"> <title>CRUD</title></head><body><table原创 2022-04-28 18:13:22 · 475 阅读 · 0 评论 -
IDEA+ Spring Boot +Thymeleaf 报错Error resolving template [index], template might not exist or might n
报错原因:找不到模板/找不到路径解决办法:导入依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> </dependency>添加路径 .原创 2022-04-27 16:49:49 · 712 阅读 · 0 评论 -
Spring Boot整合Mybatis 创建临时表
xml中添加 <select id="createTempTable" > select uid into ${test} from My_user </select> <update id="dropTable" > drop table if exists ${test} </update> <select id="selectFromTmpTable" resultTyp.原创 2022-02-06 20:08:43 · 3699 阅读 · 0 评论 -
Spring Boot 通过web开启定时任务
使用@Scheduled创建定时任务https://blog.youkuaiyun.com/weixin_42033269/article/details/101477871下面用之前的为基础进行介绍https://blog.youkuaiyun.com/Oceansssss/article/details/122668633在MyUserService中添加接口 public void openSchedule();//开启定时任务 public void closeSchedule();//关闭定时原创 2022-01-27 21:51:00 · 918 阅读 · 4 评论 -
SpringBoot整合Mybatis连接SQL Server (4) 跨库批量插入
将一个库的某张表的数据插入另一个库中的某张表假设要实现如下sql语句use pcshopinsert into My_user select * from Test..My_user以上一节内容为基础https://blog.youkuaiyun.com/Oceansssss/article/details/122692556修改entity包中的MyUser_2类package com.example.demo.entity.two;import lombok.Data;@Datapub原创 2022-01-26 21:28:30 · 1441 阅读 · 0 评论 -
SpringBoot整合Mybatis连接SQL Server (3) 双数据源配置
先附上完整的层次结构配置application.properties注意填自己的数据库名,登录名和密码spring.application.name=demoserver.port=8080mybatis.mapper-locations=classpath:mappers/*xmlmybatis.type-aliases-package=com.example.demo.entityspring.datasource.one.jdbc-url=jdbc:sqlserver://12原创 2022-01-25 22:35:05 · 2113 阅读 · 0 评论 -
Spring Boot整合MyBatis连接 SQL Server(2)基于XML的SQL映射文件操作数据库
基于XML的SQL映射文件操作数据库在pom.xml文件中添加依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency&原创 2022-01-24 15:46:10 · 1698 阅读 · 0 评论 -
Spring Boot整合MyBatis连接 SQL Server(1)通过SQL注解的方式操作数据库
在pom.xml文件中添加依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <.原创 2022-01-19 00:15:45 · 4554 阅读 · 1 评论