zoukankan      html  css  js  c++  java
  • JPAAS整合宝蓝德

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

    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>

    在程序启动时会输出

    表示宝蓝德整合成功。

  • 相关阅读:
    Newbe.Claptrap 框架入门,第三步 —— 定义 Claptrap,管理商品库存
    Hudi on Flink在顺丰的实践应用
    Kafka监控必备——Kafka-Eagle 2.0.2正式发布
    如何将炫酷的报表直接截图发送邮件——在Superset 0.37使用Schedule Email功能
    突发!美商务部宣布封禁微信,TikTok——面对科技封锁,如何应对
    离线安装Superset 0.37
    Windows系统快速安装Superset 0.37
    Superset 0.37 发布——颜值最高的数据可视化平台
    Hive查看,删除分区
    超详细,Windows系统搭建Flink官方练习环境
  • 原文地址:https://www.cnblogs.com/yg_zhang/p/15790477.html
Copyright © 2011-2022 走看看