随笔分类 -  Java

mybatis枚举类型处理器
摘要:1. 定义枚举值的接口 2. 定义枚举类型,并实现ValuedEnum接口 3. 继承mybatis的BaseTypeHandler抽象类 @MappedTypes注解表示ValuedEnumTypeHandler要处理的枚举类型 4. 在mybatis的配置文件中配置ValuedEnumTypeH 阅读全文

posted @ 2017-12-16 09:48 jec 阅读(236) 评论(0) 推荐(0)

springboot maven 多环境配置
摘要:1.使用Intellij IDEA创建Spring Boot和Maven项目 2.Spring Boot项目下application.yaml(yaml支持中文)或者application.properties(properties不支持中文) application.yaml applicatio 阅读全文

posted @ 2017-11-23 19:38 jec 阅读(10373) 评论(1) 推荐(4)

spring-mvc junit测试
摘要:import org.junit.runner.RunWith; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.juni... 阅读全文

posted @ 2016-05-13 17:45 jec 阅读(448) 评论(0) 推荐(0)

spring-mvc jackson配置json为空不输出
摘要:使用的spring-mvc版本是4.1.6,jackson版本是2.1.4 在spring-mvc配置文件中添加以下代码就行 阅读全文

posted @ 2016-05-13 15:09 jec 阅读(2741) 评论(0) 推荐(0)

ubuntu idea goagent代理证书无效(Problem with connection: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find val)
摘要:ubuntu idea设置goagent代理,出错: Problem with connection: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpa 阅读全文

posted @ 2016-04-22 17:14 jec 阅读(3) 评论(0) 推荐(0)

idea Error:(65, 27) java: 未结束的字符串文字
摘要:今天在使用IDEA的时候,出现了这个错误,原因项目文件编码不一致导致的,解决方法是: 将项目的文件编码全改成一致(UTF-8),如下图所示: 再检查encodings.xml(.idea目录下)文件,也统一成UTF-8编码即可。 阅读全文

posted @ 2016-04-11 09:51 jec 阅读(946) 评论(0) 推荐(0)

solr-5.3.1配置(win7 x64)
摘要:下载solr,下载地址http://www.eu.apache.org/dist/lucene/solr/5.3.1/solr-5.3.1.zip解压到某个目录下,这里是解压到了d盘目录下,路径:D:solr-5.3.1目录下打开cmd进入到D:solr-5.3.1\bin目录下,输入:pushd ... 阅读全文

posted @ 2015-11-09 11:57 jec 阅读(350) 评论(0) 推荐(0)

lucene-5.3.1配置(win7x64)
摘要:lucene下载地址:http://www.us.apache.org/dist/lucene/java/5.3.1/lucene-5.3.1.zip下载之后解压控制台应用程序下配置:找到lucene-core-5.3.1.jar,lucene-analyzers-common-5.3.1.jar,... 阅读全文

posted @ 2015-11-05 20:13 jec 阅读(472) 评论(0) 推荐(0)

idea常用快捷键
摘要:转至http://www.open-open.com/lib/view/open1396578860887.htmlIntelliJ Idea 常用快捷键列表Ctrl+Shift + Enter,语句完成“!”,否定完成,输入表达式时按 “!”键Ctrl+E,最近的文件Ctrl+Shift+E,最近... 阅读全文

posted @ 2015-06-17 15:32 jec 阅读(196) 评论(0) 推荐(0)

java使用ant.jar解压缩文件
摘要:ant.jar下载地址http://ant.apache.org/bindownload.cgi压缩文件代码:import org.apache.tools.ant.Project;import org.apache.tools.ant.taskdefs.Zip;import org.apache.... 阅读全文

posted @ 2015-05-26 17:59 jec 阅读(1627) 评论(1) 推荐(0)

Sax解析xml文档
摘要:测试的xml数据: George John Reminder Don't forget the meeting!新建SaxTest类继承至DefaultHandleimport org.xml.sax.Attributes;import org.xml.sax.SAXExce... 阅读全文

posted @ 2015-05-26 17:49 jec 阅读(177) 评论(0) 推荐(0)

导航