Java
sql2zy
这个作者很懒,什么都没留下…
展开
-
Linux、JavaMail 发送邮件
在windows下发送邮件可以直接使用25端口,但是在Linux下可能无法正常运行:Failed messages: com.sun.mail.util.MailConnectException: Couldn't connect tohost, port: xxxxxxx, 25; timeout -1.。在Linux下可以使用ssl加密465端口,概要配置如下:spring.mail.host=xxxxspring.mail.default-encoding=UTF-8spring..原创 2020-11-11 10:36:07 · 304 阅读 · 0 评论 -
springboot+jersey+jar:java.io.FileNotFoundException: *jar!\BOOT-INF\classes (系统找不到指定的路径。)
整合springboot+jersey,打包成jar,使用java -jar xxx.jar时,可能会出现:org.springframework.beans.factory.UnsatisfiedDependencyException:Error creating bean with name 'org.springframework.boot.autoconfigure.jersey....原创 2020-04-15 09:40:42 · 1378 阅读 · 0 评论 -
swagger配置
1、pox.xml在pox.xml中添加内容: <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> <version>2.6.1</version&g转载 2019-01-28 13:38:07 · 169 阅读 · 0 评论 -
Jersey注解
1、@Path标记在类名之上,也可以标记在方法名上。该注解接收一个value参数,表示定义资源的地址。2、@GET、@PUT、@POST、@DELETE用于处理GET、PUT、POST、DELETE等请求。3、@Produces用来指定将要返回给client端的数据标识类型(MIME)。@Produces可以作为class注释,也可以作为方法注释,方法的@Produces注释将...转载 2019-01-30 16:08:25 · 189 阅读 · 0 评论 -
jersey+spring @Autowired注入失败
Controller中: */@RestController@Api(value = "/manage",description = "站点管理")@Path("/manage")public class ManageEndpoint { @Autowired private DeviceService deviceService; @GET @P...原创 2019-03-08 17:25:35 · 379 阅读 · 0 评论 -
jetty支持https
1、生成keystore文件:myJetty.keystore,放在etc路径下2、修改start.ini添加以下内容:--module=ssljetty.server.dumpBeforeStop=etc/jetty-ssl.xmletc/jetty-https.xml3、修改etc/jetty-ssl.xml <Call name="addConnector...原创 2019-09-30 10:45:48 · 366 阅读 · 0 评论