maven jetty https配置

maven jetty https配置

参考链接:

http://wiki.eclipse.org/Jetty/Feature/Jetty_Maven_Plugin#Quick_Start:_Get_Up_and_Running

http://blog.csdn.net/bolg_hero/article/details/50424665

http://blog.csdn.net/tomato__/article/details/37927813

http://jingyan.baidu.com/article/d3b74d64f07e101f77e60906.html

https://my.oschina.net/cokolin/blog/409164

http://www.cnblogs.com/zhuyoufeng/p/3707448.html

环境

IDEA 2016

jetty 8

生成keystore

由于在tomcat配置https时已经做了这样的操作。

地址:

https://github.com/LJaer/ReadingNotes/blob/master/Tomcat/%E9%85%8D%E7%BD%AETomcat%E4%BD%BF%E7%94%A8https%E5%8D%8F%E8%AE%AE.md

配置pox.xml
<plugin>
    <groupId>org.mortbay.jetty</groupId>
    <artifactId>jetty-maven-plugin</artifactId>
    <version>8.1.16.v20140903</version>
    <configuration>
        <stopPort>9966</stopPort>
        <stopKey>foo</stopKey>
        <scanIntervalSeconds>5</scanIntervalSeconds>
        <webApp>
            <contextPath>/</contextPath>
        </webApp>
        <connectors>
            <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
                <port>8080</port>
                <maxIdleTime>60000</maxIdleTime>
            </connector>
            <connector implementation="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
                <port>8443</port>
                <password>123456</password>
                <keystore> D:/tomcat.keystore</keystore>
            </connector>
        </connectors>
    </configuration>
</plugin>
启动

jetty:run

pic8

在浏览器输入:

https://localhost:8443

pic9

在浏览器输入:

http://localhost:8080

pic10

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值