SpringBoot 通过自定义注解实现切面编程 1、相关依赖包 <!-- aop 依赖包 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-aop</artifa ...
分类:
编程语言 时间:
2020-11-12 13:21:35
阅读次数:
11
配置 以最简单的jdbc事务为例: <!-- 数据源以Sping自带为例,每次请求均返回一个新的连接 --> <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <pro ...
分类:
编程语言 时间:
2020-11-07 15:32:15
阅读次数:
20
#菜单模块 ##Controller package com.atguigu.atcrowdfunding.controller; import java.util.List; import org.springframework.beans.factory.annotation.Autowired ...
分类:
其他好文 时间:
2020-11-02 10:21:42
阅读次数:
24
1. 在pom中添加所需依赖 创建一个springboot工程,添加所需要的依赖,持久化用的是mybatis <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</a ...
分类:
编程语言 时间:
2020-11-01 10:24:47
阅读次数:
21
package com.utils; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.web.servlet ...
分类:
编程语言 时间:
2020-11-01 10:02:14
阅读次数:
17
1.pom文件加依赖 <!--热部署--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> ...
分类:
编程语言 时间:
2020-11-01 09:35:22
阅读次数:
15
<!-- web --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <!-- MySQL 连接驱动依赖 ...
分类:
编程语言 时间:
2020-11-01 09:18:18
阅读次数:
18
常见的是配置数据库文件, 以配置Druid连接池为例, 直接配置连接池方式如下: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi=" ...
分类:
其他好文 时间:
2020-10-31 02:06:27
阅读次数:
16
package redis.config; import org.springframework.beans.factory.annotation.Autowired;import org.springframework.data.redis.connection.DataType;import o ...
分类:
其他好文 时间:
2020-10-31 02:05:49
阅读次数:
14
Spring Boot 集成 Redis 引入依赖 pom文件引入Redis依赖spring-boot-starter-data-redis <!--redis依赖配置--> <dependency> <groupId>org.springframework.boot</groupId> <arti ...
分类:
编程语言 时间:
2020-10-30 11:33:56
阅读次数:
19