摘要:1. 定义枚举值的接口 2. 定义枚举类型,并实现ValuedEnum接口 3. 继承mybatis的BaseTypeHandler抽象类 @MappedTypes注解表示ValuedEnumTypeHandler要处理的枚举类型 4. 在mybatis的配置文件中配置ValuedEnumTypeH
阅读全文
摘要:1.使用Intellij IDEA创建Spring Boot和Maven项目 2.Spring Boot项目下application.yaml(yaml支持中文)或者application.properties(properties不支持中文) application.yaml applicatio
阅读全文
摘要:import org.junit.runner.RunWith; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.juni...
阅读全文
摘要:使用的spring-mvc版本是4.1.6,jackson版本是2.1.4 在spring-mvc配置文件中添加以下代码就行
阅读全文
摘要:ubuntu idea设置goagent代理,出错: Problem with connection: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpa
阅读全文
摘要:今天在使用IDEA的时候,出现了这个错误,原因项目文件编码不一致导致的,解决方法是: 将项目的文件编码全改成一致(UTF-8),如下图所示: 再检查encodings.xml(.idea目录下)文件,也统一成UTF-8编码即可。
阅读全文
摘要:下载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 ...
阅读全文
摘要: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,...
阅读全文
摘要:转至http://www.open-open.com/lib/view/open1396578860887.htmlIntelliJ Idea 常用快捷键列表Ctrl+Shift + Enter,语句完成“!”,否定完成,输入表达式时按 “!”键Ctrl+E,最近的文件Ctrl+Shift+E,最近...
阅读全文
摘要:ant.jar下载地址http://ant.apache.org/bindownload.cgi压缩文件代码:import org.apache.tools.ant.Project;import org.apache.tools.ant.taskdefs.Zip;import org.apache....
阅读全文
摘要:测试的xml数据: George John Reminder Don't forget the meeting!新建SaxTest类继承至DefaultHandleimport org.xml.sax.Attributes;import org.xml.sax.SAXExce...
阅读全文