- 博客(63)
- 资源 (10)
- 收藏
- 关注
原创 spring boot 如何加载子模块的yml
比如 子模块的文件名是application-expand.yml。1.首先yml的名称不能和主启动类所在的名称一致。2.在主启动类所在的yml 文件中配置上文件名称。那主启动类所在模块的配置应该就是这样。
2022-11-13 10:41:21
1177
转载 Error: Cannot find a valid baseurl for repo: base问题(centos6源的解释与解决办法)
sed -i “s|enabled=1|enabled=0|g” /etc/yum/pluginconf.d/fastestmirror.confmv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backupcurl -o /etc/yum.repos.d/CentOS-Base.repo https://www.xmpan.com/Centos-6-Vault-Aliyun.repoyum clean al.
2021-03-24 21:25:20
789
原创 基于spring boot 的 shiro demo
shiro 框架的学习笔记在方法上加上@RequiresPermissions注解时访问url 报404的解决方案@Bean public static DefaultAdvisorAutoProxyCreator getDefaultAdvisorAutoProxyCreator() { DefaultAdvisorAutoProxyCreator defaultAdvisorAutoProxyCreator = new DefaultAdvisorAuto.
2021-03-14 11:53:17
165
原创 restTemplate 发送 form body
<dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> <version>5.2.2.RELEASE</version> </depend...
2019-12-16 14:25:55
522
原创 httpclient post 发送 param 和 body
package com.example.demo.webservice;import org.apache.http.client.HttpClient;import org.apache.http.client.methods.CloseableHttpResponse;import org.apache.http.client.methods.HttpPost;import org...
2019-12-14 09:13:20
6051
原创 手写blockqueue队列
package com.example.demo.webservice;import java.util.concurrent.locks.Condition;import java.util.concurrent.locks.Lock;import java.util.concurrent.locks.ReentrantLock;public class BlockQueue<...
2019-12-03 15:30:18
228
原创 spring boot 整合webservice启动不了 pom改成如下试下
<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apac...
2019-11-28 19:49:01
358
原创 Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
<dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>2...
2019-11-10 22:43:47
198
原创 spring data rest 查询集合的接收
resources<LcDutyEntity> list=ipolicy.getApi(contno);暴露id 之后,lcdutyentity可以接收到数据
2019-08-20 14:43:36
331
转载 sftp文件上传下载
package com.taikang.ftp; import java.io.ByteArrayInputStream;import java.io.File;import java.io.FileInputStream;import java.io.FileNotFoundException;import java.io.FileOutputStream;import java...
2018-06-29 20:31:19
744
原创 List实体集合转List<String>
llOnlineQuestionInfoRepository.findByBackFlag("1").stream().map(LlonlineQuestionInfoDo::getId).map(LlOnlineQuestionInfoId: :getClaimTaskNo).distinct().collect(Collectors.toList());
2018-05-18 17:28:00
5685
1
原创 case when then end
create table studentscore( id int PRIMARY key auto_increment, name nvarchar(20) not null, subject nvarchar(20) not null, score int not null ); insert studentscore(name,subject,score) values ('张三...
2018-04-10 19:39:00
166
原创 生成压缩文件
public class ZipTest { public static void main(String[] args) throws Exception { // TODO Auto-generated method stub File file=new File("E://2.pdf"); OutputStream out=new FileOutput...
2018-04-08 21:01:45
224
原创 Jaxb把类和xml互转
创建customer类import javax.xml.bind.annotation.XmlAccessType;import javax.xml.bind.annotation.XmlAccessorType;import javax.xml.bind.annotation.XmlAttribute;import javax.xml.bind.annotation.XmlElement;imp...
2018-04-04 19:29:11
450
原创 DocumentHelper解析xml文件
public class TestXml2 { public static void main(String[] args) { // TODO Auto-generated method stub String transMessage = "<?xml version=\"1.0\" encoding=\"GBK\"?><message>" + "<body&a
2018-03-30 19:47:06
18965
2
原创 java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory解决
在pom文件中在 <dependency> <groupId>javax.xml.bind</groupId> <artifactId>jaxb-api</artifactId> <version>2.1</version> </dependency&
2018-03-28 09:00:51
17428
3
原创 webservice 客户端
创建一个java project。第一步:拷贝cxf提供的jar包第二步:使用jdk提供的命令生成本地代码第三步:编写测试类public class WeatherTest { @Test public void testWeather(){ JaxWsProxyFactoryBean proxy=new JaxWsProxyFactoryBean(); proxy.setAddress(...
2018-03-25 19:00:35
187
原创 webservice 服务器端
创建一个java project。名称随意。我的工程名称为:webservice1第一步:拷贝cxf提供的jar包.第二步:编写webservice服务端的接口和实现类接口@WebServicepublic interface WeatherService { public String getWeatherByCityName(String cityName);}实现类public clas...
2018-03-25 18:56:26
368
原创 java sftp 的文件上传和下载
package com.taikang.ftp;import java.io.File;import java.io.FileInputStream;import java.io.FileOutputStream;import java.io.IOException;import java.util.Iterator;import java.util.Properties;import java....
2018-03-25 14:59:07
1868
原创 Java 创建带多级目录的文件
/** * * <p>Title: main</p> * <p>Description: 创建带多级目录的文件</p> * @param args * @throws Exception */ public static void main(String[] args) throws Exc...
2018-03-24 09:43:49
1741
转载 java 代码实现上传和下载功能
public class FtpUtils { private String hostname = "127.0.0.1"; private Integer port = 21; private String username = "test"; private String password = "123456"; private FTPClient ftpClient = null; /** ...
2018-03-21 20:54:17
456
原创 在本地搭建ftp服务器
1.创建maven项目pom文件如下<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache....
2018-03-21 20:52:40
252
原创 schedule 定时复制图片
public class TimerTest { public static void main(String[] args) { // TODO Auto-generated method stub timer4(); } private static void timer4() { // TODO Auto-generated method stub Calendar...
2018-03-15 19:31:44
208
原创 单元测试测试用例覆盖率为0
做一下记录,做测试覆盖的时候,总是显示覆盖率为0,于是在pom文件中添加plugin> groupId>org.codehaus.mojogroupId> artifactId>cobertura-maven-pluginartifactId> version>2.7version> plugin> 解決了
2018-02-07 19:56:55
6357
3
转载 maven test的覆盖率测试
对junit单元测试的报告:类似这样的结果------------------------------------------------------- T E S T S-------------------------------------------------------Running com.cn.qin.actionTest.UserActionTestsdffs
2018-02-07 19:26:57
2664
原创 mysql exists的理解
create table a(a_id int,a_name varchar(20));create table b(b_id int,b_name varchar(20));创建两个表,a和b ,插入部分数据,执行select * from a where exists (select b_id from b
2018-02-05 20:40:48
432
转载 ssh maven 整合的pom文件
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">4.0.0cn.itcast.mavenmaven-parent0.0.1
2017-09-19 11:45:25
1224
转载 事务的隔离级别
(1)Read uncommitted 读未提交 公司发工资了,领导把5000元打到singo的账号上,但是该事务并未提交,而singo正好去查看账户,发现工资已经到账,是5000元整,非常高兴。 可是不幸的是,领导发现发给singo的工资金额不对,是2000元,于是迅速回滚了事务,修改金额后,将事务提交,最后singo实际的工资只有2000元, singo空欢喜一场
2017-09-14 21:35:50
168
原创 创建和删除华为ME60用户
进入local-aaa-server 删除用户undo user username添加用户 user (username) password irreversible-cipher (password) authentication-type T block fail-times 3 interval 5 level 3
2016-12-27 15:19:24
2567
原创 华为Gpon 添加教程
dba-profile add profile-id 220 profile-name "dba-profile_220" type3 assure 15360 max 20480 dba-profile add profile-id 221 profile-name "dba-profile_221" type2 assure 1024 dba-profile add profi
2016-11-09 12:15:18
1980
转载 绝对干货:供个人开发者赚钱免费使用的一些好的API接口
绝对干货:供个人开发者赚钱免费使用的一些好的API接口原创 2015-10-19 耿广龙 非著名程序员(点击上方公众号,可快速关注)公众号:smart_android作者:耿广龙|loonggg点击“阅读原文”,可查看更多内容和干货不久前,我写了一篇文章,名为《科普技术贴:个人开发者的那些赚钱方式》,讲了一些个
2016-03-11 16:48:38
2879
转载 JavaEE+3G/Android 学习路线图
http://www.itheima.com/subject/javastudypath/index.shtml?141013wwtqun
2014-10-15 11:15:40
416
jbpm_6.0.1_api.rar
2016-05-30
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人