Spring实例化bean的方式Set注入构造器注入静态工厂注入实例化工厂注入案例实操Set注入xml配置(同时spring也提供了对于基本数据类型的set注入方式)<?xmlversion="1.0"encoding="UTF-8"?><beansxmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http
分类:
编程语言 时间:
2020-10-05 21:43:03
阅读次数:
104
使用SpringBoot进行单元测试 依赖: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> ...
分类:
编程语言 时间:
2020-09-24 21:18:50
阅读次数:
37
一、eureka:服务注册 1、服务端(先启动) 1、pom.xml <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-eureka-server</a ...
分类:
编程语言 时间:
2020-09-24 21:06:33
阅读次数:
52
自定义过滤器 JavaWeb中的普通过滤器 对POST请求的乱码解决不了 SpringMVC的过滤器 在web.xml中配置编码格式 <filter> <filter-name>encoding</filter-name> <filter-class>org.springframework.web. ...
分类:
编程语言 时间:
2020-09-21 12:20:11
阅读次数:
97
org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [applicationContext.xml]; ne ...
分类:
编程语言 时间:
2020-09-21 12:02:35
阅读次数:
53
首先自定义Jpa接口类型需要继承接口JpaSpecificationExecutor<T> 下面是实现多条件查询 + 分页 + 排序的代码 导入的的相关类 import org.springframework.data.domain.PageRequest; import org.springfra ...
分类:
编程语言 时间:
2020-09-18 12:29:40
阅读次数:
56
spring boot项目中报此错误,可能的原因是 在GetMapping中没有指定参数名 @GetMapping("/verifyLogin") public HttpResult verifyLogin(@PathVariable("token") String token) 正确的应该是: @ ...
分类:
编程语言 时间:
2020-09-18 03:34:26
阅读次数:
47
1: Nacos搭建可以参考 https://www.cnblogs.com/zhangXingSheng/p/13678173.html SpringCloud 版本 <dependency> <groupId>org.springframework.cloud</groupId> <artifa ...
分类:
编程语言 时间:
2020-09-18 03:03:34
阅读次数:
57
一、springmvc的xml配置文件 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/200 ...
分类:
编程语言 时间:
2020-09-18 01:58:54
阅读次数:
45
1. Maven依赖 <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-zuul</artifactId> </dependency> 2. ...
分类:
编程语言 时间:
2020-09-17 22:59:48
阅读次数:
34