随笔分类 -  Java

摘要:举个例子 Boolean xx= Pattern.matches("^[a-zA-Z0-9\\s]*$", " 801 Tampines Ave 4 Singapore 520801sss1"); 匹配结果是false 在众多正则表达式的教程中,对于\s的解释都是匹配空格。但在java中,\s不能对 阅读全文
posted @ 2020-02-26 14:42 厦门_成 阅读(1659) 评论(0) 推荐(2)
摘要:报错内容:class path resource [client.p12] cannot be resolved to absolute file path because it does not reside in the file system 问题所在: 代码使用了 ResourceUtils 阅读全文
posted @ 2019-07-11 15:44 厦门_成 阅读(1628) 评论(0) 推荐(0)
摘要:maven导入sqlserver驱动jar包依赖包到本地仓库 maven项目使用sqlserver的依赖,先下载一个sqlserver的驱动,网址:https://www.microsoft.com/en-us/download/confirmation.aspx?id=11774 然后解压找到sq 阅读全文
posted @ 2019-07-05 09:28 厦门_成 阅读(2402) 评论(0) 推荐(0)
摘要:Spring Boot的spring.jmx资源管理是默认打开的,而两个项目同时使用会冲突 需要在第二个、或者第三个springboot项目中增加如下配置: 1:application.properties spring.jmx.enabled=false 2: jmx: enabled: fals 阅读全文
posted @ 2019-01-17 13:50 厦门_成 阅读(552) 评论(0) 推荐(0)
摘要:pom配置: 一调用以下代码就报错: Service service = new Service(); Call call = (Call) service.createCall(); 解决方法: 1,commons-discovery依赖commons-logging,所以我们把commons-l 阅读全文
posted @ 2018-04-23 17:17 厦门_成 阅读(12388) 评论(0) 推荐(2)
摘要:配置文件app.properties如下: yt.api.url=http://localhost:9000 springmvc.xml 增加配置: <context:property-placeholder location="classpath:app.properties"/> 控制器调用: 阅读全文
posted @ 2018-03-15 14:50 厦门_成 阅读(1644) 评论(0) 推荐(1)
摘要:1:项目使用的是jre1.8版本。 2:服务器 apache-tomcat-8.5.23 报错如下: 严重 [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0] com.microsoft.sqlserver.jdbc.S 阅读全文
posted @ 2017-12-07 14:25 厦门_成 阅读(2583) 评论(0) 推荐(0)
摘要:1:打开 计算机→属性→高级系统设置→高级→环境变量 添加系统变量: 1.1 新建JAVA_HOME 值为jdk的目录 1.2 找到path 变量 添加值 %JAVA_HOME%\bin;%JAVA_HOME%\jre\bin; 1.3 新建 CLASSPATH 变量 值为 .;%JAVA_HOME 阅读全文
posted @ 2017-12-05 10:05 厦门_成
摘要:解决使用maven的java web项目导入后出现的有关问题 -cannot be read or is not a valid ZIP file 错误问题:虽然查找repository目录下是有jar包,但是jar包是有问题的(可能是下载不完整),所以更改镜像地址到国内。 解决方案: 1)删除提示 阅读全文
posted @ 2017-12-05 10:04 厦门_成 阅读(390) 评论(0) 推荐(0)