试用SOFA全家桶 - SOFA-Boot

SOFA-Boot

Posted by Claire on February 4, 2021

试用SOFA全家桶 - SOFA-Boot

功能加强点

  1. 增强 Spring Boot 的健康检查能力, Readiness Check 能力
  2. 提供类隔离的能力,ClassLoader 进行隔离,防止出现类冲突
  3. 日志空间隔离能力,自动就会将本身的日志和应用的普通日志隔离开来
  4. 提供了 SOFA 中间件统一易用的编程接口以及 Spring Boot 的 Starter,方便在 Spring Boot 环境下使用 SOFA 中间件
  5. 模块化开发,支持基于 Spring 上下文隔离的模块化开发能力

实践

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <groupId>com.alipay.sofa</groupId>
        <artifactId>sofaboot-dependencies</artifactId>
        <version>${sofa.boot.version}</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>8</source>
                    <target>8</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <properties>
        <sofa.boot.version>3.6.0</sofa.boot.version>
    </properties>

    <artifactId>sofa-boot-hutool</artifactId>

    <dependencies>
        <dependency>
            <groupId>com.alipay.sofa</groupId>
            <artifactId>healthcheck-sofa-boot-starter</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>


        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
        </dependency>
    </dependencies>

</project>