- 博客(10)
- 收藏
- 关注
原创 required a bean of type ‘org.springframework.web.client.RestTemplate‘ that could not be found.
***************************APPLICATION FAILED TO START***************************Description:Field restTemplate in lz.com.controller.SurpriseController required a bean of type 'org.springframework.web.client.RestTemplate' that could not be found..
2022-02-22 14:43:12
710
原创 Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol
Caused by: org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta-data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is co.
2022-02-22 14:36:55
467
原创 maven项目install报错:\target\surefire-reports for the individual test results
子工程中包含测试用例的都报这个错,然后网上找到方法添加maven-surefire-plugin插件,添加了插件后,pom文件的<plugin>标签里面爆红,然后网上继续搜索说是这个插件和junit有关系。麻烦,地址贴过来凑凑:学习Maven之Maven Surefire Plugin(JUnit篇) - 辵鵵 - 博客园JUnit4.0(含)到JUnit4.7(不含)的版本,这样声明:<plugin> <groupId>org.apache.maven.
2022-02-20 14:39:59
902
原创 maven打包异常:Unable to find main class
maven在对parent工程clean之后,进行install,Common工程报错Unable to find main class,因为Common工程是一些常用工具类,所以没有添加启动类。在网上搜索到了解决方法:把父工程的pom文件中<build>去掉,子工程中哪个需要打包,就在其pom文件中添加<build> <build> <plugins> <plugin>
2022-02-20 14:02:36
4736
原创 日期格式转换:将yyyyMM格式转化为yyMM格式,并列出任意年月之间的所有年月列表.
private ArrayList<String> monthNum(String beginTime, String endTime) { if (beginTime==null||"".equals(beginTime)||endTime==null||"".equals(endTime)) { logger.error("处理月份计算,开始时间或结束时间不能为空!beginTime:【{}】,endTim:【{}】", beginTime, end.
2022-02-08 15:31:56
1286
原创 springBoot快速整合MybatisPlus操作数据库
第一步:添加依赖<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.6.2</version> <relativePath/> <!-- lookup pare
2022-01-20 17:15:54
804
原创 restTemplate远程调用获取list集合类型数据,出现数据类型转换异常
两个项目之间使用restTemplate进行远程调用获取数据,a项目使用restTemplate获取b项目中的list集合类型数据,list集合中的元素为实体类,键值对类型(int id,String Name,String sex ),远程调用后虽然a获取到了list集合类型数据,但集合内部的元素变成了LinkedHashMap类型.为什么会出现这种情况我也不是很明白,贴上解决方法:a项目:b项目:...
2022-01-13 19:13:41
935
原创 读取HttpServletRequest里的内容,并转化为字符串
public static String getString(HttpServletRequest request) { //返回报文字符串 String resultXml = null; if (request != null) { // 读取请求内容 缓冲字符输入流 BufferedReader。 BufferedReader br = null; //该系统下换行符 ...
2021-12-22 10:12:10
2210
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人