随笔 - 441  文章 - 4  评论 - 84  阅读 - 109万 

现在软件国产化的需求成了刚需了,因此在实施的过程中,我们整合了宝蓝德,我将过程写一下。

1.宝蓝德提供的程序包。

 

包名 说明
bes-actuator-spring-boot-2.x-starter-9.5.2.jar 监控包,可选
bes-gmssl 这个是国密安全包,可选
bes-jasper 支持JSP,可选
bes-jdbcra 支持JDBC ,可选
bes-lite-spring-boot-2.x-starter-9.5.2 核心包,必须
bes-websocket 支持 websocket

将这些包发送到我们的私服,或者 使用 mvn install 安装到本地仓库。

 

2. 去掉 spring-boot-starter-web 的 tomcat依赖

复制代码
<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-tomcat</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
复制代码

在启动 jpaas-system 时,发现启动时,没有使用 宝蓝德启动,而是使用的 jetty。这个是怎么回事呢。

通过IDEA的依赖工具。

 

搜索 jetty ,通过依赖图,我们可以发现,依赖 jetty 的是 kettle-engine.jar ,因此,通过排除 jetty 的依赖,再启动就不会显示启动jetty 了。

 

复制代码
 <exclusions>
                <exclusion>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>jetty-jaas</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>jetty-server</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>jetty-security</artifactId>
                </exclusion>

                <exclusion>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>jetty-servlet</artifactId>
                </exclusion>

                <exclusion>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>jetty-servlet</artifactId>
                </exclusion>

                <exclusion>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>jetty-util</artifactId>
                </exclusion>

                <exclusion>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>jetty-xml</artifactId>
                </exclusion>

                <exclusion>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>jetty-webapp</artifactId>
                </exclusion>
            </exclusions>
复制代码

这没多的依赖,我们是怎么找到的呢,在 idea 中,可以双击kettle-engine定位到 kettle-engine 的依赖,然后排除掉jetty的依赖包,相当的方便。 

 

3. 在我们的程序包中增加依赖。

复制代码
      <dependency>
            <groupId>com.bes.appserver</groupId>
            <artifactId>bes-websocket</artifactId>
        </dependency>
        <dependency>
            <groupId>com.bes.appserver</groupId>
            <artifactId>bes-lite-spring-boot-starter</artifactId>
        </dependency>
        <dependency>
            <groupId>com.bes.appserver</groupId>
            <artifactId>bes-actuator-spring-boot-2.x-starter</artifactId>
        </dependency>
        <dependency>
            <groupId>com.bes.appserver</groupId>
            <artifactId>bes-gmssl</artifactId>
     </dependency>
复制代码

在程序启动时会输出

 

表示宝蓝德整合成功。

 

posted on   自由港  阅读(1039)  评论(1编辑  收藏  举报
相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)
历史上的今天:
2015-01-11 Future 模式介绍
点击右上角即可分享
微信分享提示