![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
JAVA
文章平均质量分 88
secoler
nice to meet you!
展开
-
Serverlet服务器端模板
package com.bugfree.servlet;public class BugfreeinfoServlet extends HttpServlet {/** * */ private static final long serialVersionUID = 1L;public void doGet(HttpServletRequest request, HttpSe原创 2016-01-07 15:23:11 · 396 阅读 · 0 评论 -
JAVA发送邮件代码
package com.bugfree.mail;import java.io.IOException;import java.io.OutputStreamWriter;import java.io.UnsupportedEncodingException;import java.net.HttpURLConnection;import java.net.ProtocolExcepti原创 2016-01-07 15:36:02 · 620 阅读 · 0 评论 -
文档格式转换(Office文档转成PDF或XPS)
最近在做微信云打印服务器,云服务器与微信云服务器通信己经OK,现在有一个很核心的功能需要实现,就是服务器端文档的格式转换目标:将office、txt、图片格式的文档转成PDF查阅了一些资料,格式转换有4种方法:1、Linux系统下采用JAVA语言调用Unoconv命令,通过LibreOffice将Office文档转成PDF;2、Windows下采用C#语言调用.NET库中对应Off原创 2016-01-08 14:36:48 · 2100 阅读 · 1 评论 -
下载图片、文件等代码
页面发送请求,后台传输文件代码:byte[] tempContent = null;fileStream = new FileInputStream(filePath);tempContent = new byte[fileStream.available()]; fileStream.read(tempContent, 0, fileStream.available()); re原创 2017-01-11 11:11:09 · 999 阅读 · 0 评论 -
eclipse配置tomcat后,启动tomcat访问http://localhost:8080报404
eclipse正常启动tomcat,但是 访问http://localhost:8080 却报404错误修改下配置 就好操作如下图 打开eclipse的server视图,双击配置好的那个tomcat,出现tomcat配置窗口,看到那个server location 是不是选第一项(默认是第一项),请选到第二项。如果这3项都是灰色的,请删除配置好的转载 2017-01-22 10:49:25 · 447 阅读 · 0 评论 -
springBoot微服务框架pom.xml内容(支持jsp)
在用springBoot开发web项目时,经常会遇到如下2个问题:1、This application has no explicit mapping for /error, so you are seeing this as a fallback.2、Invocation of init method failed; nested exception is java.lang.Illeg原创 2017-10-09 17:41:44 · 1049 阅读 · 0 评论 -
微服务之springboot项目整合
spingboot与springmvc相比有很多优点:1、直接通过main方法启动,带内置tomcat容器;2、不需要再多的配置项,功能通过注解即可实现。 项目下载地址:https://download.csdn.net/download/secoler/10567884整合了mabatis、开启了事务、加载多个properties,xml文件、实现了拦截器、实现了自定义注...原创 2018-07-27 14:53:58 · 568 阅读 · 0 评论 -
intellij ideal下用spring test + junit进行单元测试并生成代码覆盖率报告
通过Spring Test + junit可以自动注入bean,抛开容器进行单元测试。步骤:(以下步骤均在intellj ideal下操作)1、新建test目录,设置为Test Sources Root2、在test目录下新建config目录,将配置文件(.xml .properties)放到该目录下备注:biz-context.xml中与容器相关的配置需要删除,jdbc之前是由weblogi...原创 2019-02-28 17:16:43 · 2641 阅读 · 0 评论