Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

add just springbooot3 samples #311

Merged
merged 18 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/arklet_unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ jobs:
cache: maven

- name: Test
run: mvn clean install -DskipTests -Dmaven.javadoc.skip=true -B -U
run: mvn clean install -DskipTests -P8-release -Dmaven.javadoc.skip=true -B -U
&& sh ./check_format.sh
&& mvn test
&& mvn test -P8-release

- name: upload coverage reports to Codecov with github action
uses: codecov/codecov-action@v3
Expand All @@ -56,9 +56,9 @@ jobs:
cache: maven

- name: Test
run: mvn clean install -DskipTests -Dmaven.javadoc.skip=true -B -U
run: mvn clean install -DskipTests -P17-release -Dmaven.javadoc.skip=true -B -U
&& sh ./check_format.sh
&& mvn test
&& mvn test -P17-release

- name: upload coverage reports to Codecov with github action
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v3
2 changes: 1 addition & 1 deletion .github/workflows/serverless_runtime_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
cache: maven
- name: Build with Maven
working-directory: sofa-serverless-runtime
run: mvn clean install -DskipTests -B -U -e && sh ./check_format.sh
run: mvn clean install -P8-release -DskipTests -B -U -e && sh ./check_format.sh
release_for_jdk8:
needs: build
runs-on: ubuntu-latest
Expand Down
15 changes: 1 addition & 14 deletions samples/springboot3-samples/db/mybatis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ base 为普通 springboot 改造成的基座,改造内容为在 pom 里增加
<groupId>com.alipay.sofa.serverless</groupId>
<artifactId>sofa-serverless-base-starter</artifactId>
<!-- 以上版本支持springboot3 -->
<version>0.5.3-jdk17</version>
<version>0.5.3-jdk17-SNAPSHOT</version>
</dependency>

<dependency>
Expand All @@ -25,19 +25,6 @@ base 为普通 springboot 改造成的基座,改造内容为在 pom 里增加
</exclusion>
</exclusions>
</dependency>
<dependency>
<!-- 增加适配 springboot3 的 log-sofa-boot-starter 版本 -->
<groupId>com.alipay.sofa</groupId>
<artifactId>log-sofa-boot-starter</artifactId>
<version>999-not-exist</version>
<exclusions>
<!-- 排除 sofa-boot-alipay-autoconfigure -->
<exclusion>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-boot-alipay-autoconfigure</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- log4j2 相关依赖 -->
<dependency>
Expand Down
16 changes: 10 additions & 6 deletions samples/springboot3-samples/db/mybatis/base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<groupId>com.alipay.sofa.serverless</groupId>
<artifactId>sofa-serverless-base-starter</artifactId>
<!-- 以上版本支持springboot3 -->
<version>0.5.3-jdk17</version>
<version>0.5.3-jdk17-SNAPSHOT</version>
</dependency>

<dependency>
Expand All @@ -83,18 +83,22 @@
</exclusions>
</dependency>
<dependency>
<!-- 增加适配 springboot3 的 log-sofa-boot-starter 版本 -->
<groupId>com.alipay.sofa</groupId>
<artifactId>log-sofa-boot-starter</artifactId>
<version>999-not-exist</version>
<version>3.9.1</version>
<exclusions>
<!-- 排除 sofa-boot-alipay-autoconfigure -->
<exclusion>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-boot-alipay-autoconfigure</artifactId>
<groupId>com.alipay.sofa.common</groupId>
<artifactId>sofa-common-tools</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<!-- 增加适配 springboot3 的 sofa-common-tools 版本 -->
<groupId>com.alipay.sofa.common</groupId>
<artifactId>sofa-common-tools</artifactId>
<version>2.0.3</version>
</dependency>

<dependency>
<groupId>com.alipay.sofa.serverless</groupId>
Expand Down
15 changes: 1 addition & 14 deletions samples/springboot3-samples/logging/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ base 为普通 springboot 改造成的基座,改造内容为在 pom 里增加
<groupId>com.alipay.sofa.serverless</groupId>
<artifactId>sofa-serverless-base-starter</artifactId>
<!-- 以上版本支持springboot3 -->
<version>0.5.3-jdk17</version>
<version>0.5.3-jdk17-SNAPSHOT</version>
</dependency>
<!-- end 动态模块相关依赖 -->

Expand All @@ -29,19 +29,6 @@ base 为普通 springboot 改造成的基座,改造内容为在 pom 里增加
</exclusion>
</exclusions>
</dependency>
<dependency>
<!-- 增加适配 springboot3 的 log-sofa-boot-starter 版本 -->
<groupId>com.alipay.sofa</groupId>
<artifactId>log-sofa-boot-starter</artifactId>
<version>999-not-exist</version>
<exclusions>
<!-- 排除 sofa-boot-alipay-autoconfigure -->
<exclusion>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-boot-alipay-autoconfigure</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- end 单 host 部署的依赖 -->

<!-- log4j2 相关依赖 -->
Expand Down
16 changes: 10 additions & 6 deletions samples/springboot3-samples/logging/log4j2/base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<groupId>com.alipay.sofa.serverless</groupId>
<artifactId>sofa-serverless-base-starter</artifactId>
<!-- 以上版本支持springboot3 -->
<version>0.5.3-jdk17</version>
<version>0.5.3-jdk17-SNAPSHOT</version>
</dependency>

<dependency>
Expand All @@ -51,18 +51,22 @@
</exclusions>
</dependency>
<dependency>
<!-- 增加适配 springboot3 的 log-sofa-boot-starter 版本 -->
<groupId>com.alipay.sofa</groupId>
<artifactId>log-sofa-boot-starter</artifactId>
<version>999-not-exist</version>
<version>3.9.1</version>
<exclusions>
<!-- 排除 sofa-boot-alipay-autoconfigure -->
<exclusion>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-boot-alipay-autoconfigure</artifactId>
<groupId>com.alipay.sofa.common</groupId>
<artifactId>sofa-common-tools</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<!-- 增加适配 springboot3 的 sofa-common-tools 版本 -->
<groupId>com.alipay.sofa.common</groupId>
<artifactId>sofa-common-tools</artifactId>
<version>2.0.3</version>
</dependency>
<dependency>
<groupId>com.lmax</groupId>
<artifactId>disruptor</artifactId>
Expand Down
15 changes: 1 addition & 14 deletions samples/springboot3-samples/msg/kafka/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ base 为普通 springboot 改造成的基座,改造内容为在 pom 里增加
<groupId>com.alipay.sofa.serverless</groupId>
<artifactId>sofa-serverless-base-starter</artifactId>
<!-- 以上版本支持springboot3 -->
<version>0.5.3-jdk17</version>
<version>0.5.3-jdk17-SNAPSHOT</version>
</dependency>
<!-- end 动态模块相关依赖 -->

Expand All @@ -27,19 +27,6 @@ base 为普通 springboot 改造成的基座,改造内容为在 pom 里增加
</exclusion>
</exclusions>
</dependency>
<dependency>
<!-- 增加适配 springboot3 的 log-sofa-boot-starter 版本 -->
<groupId>com.alipay.sofa</groupId>
<artifactId>log-sofa-boot-starter</artifactId>
<version>999-not-exist</version>
<exclusions>
<!-- 排除 sofa-boot-alipay-autoconfigure -->
<exclusion>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-boot-alipay-autoconfigure</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- end 单 host 部署的依赖 -->

<!-- log4j2 相关依赖 -->
Expand Down
16 changes: 10 additions & 6 deletions samples/springboot3-samples/msg/kafka/base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<groupId>com.alipay.sofa.serverless</groupId>
<artifactId>sofa-serverless-base-starter</artifactId>
<!-- 以上版本支持springboot3 -->
<version>0.5.3-jdk17</version>
<version>0.5.3-jdk17-SNAPSHOT</version>
</dependency>

<dependency>
Expand All @@ -62,18 +62,22 @@
</exclusions>
</dependency>
<dependency>
<!-- 增加适配 springboot3 的 log-sofa-boot-starter 版本 -->
<groupId>com.alipay.sofa</groupId>
<artifactId>log-sofa-boot-starter</artifactId>
<version>999-not-exist</version>
<version>3.9.1</version>
<exclusions>
<!-- 排除 sofa-boot-alipay-autoconfigure -->
<exclusion>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-boot-alipay-autoconfigure</artifactId>
<groupId>com.alipay.sofa.common</groupId>
<artifactId>sofa-common-tools</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<!-- 增加适配 springboot3 的 sofa-common-tools 版本 -->
<groupId>com.alipay.sofa.common</groupId>
<artifactId>sofa-common-tools</artifactId>
<version>2.0.3</version>
</dependency>

<dependency>
<groupId>com.alipay.sofa.serverless</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.alipay.sofa.base.rest;

import com.alipay.sofa.base.facade.SampleService;
import jakarta.annotation.Resource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
Expand All @@ -16,7 +17,7 @@ public class SampleController {

private static Logger LOGGER = LoggerFactory.getLogger(SampleController.class);

@Autowired
@Resource
private KafkaTemplate<Object, Object> template;

@Autowired
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
spring.application.name=base
logging.file.path=./msg/kafka/logs/
logging.path=./msg/kafka/logs/
logging.level.com.alipay.sofa.web=DEBUG
logging.level.root=INFO
logging.level.com.alipay.sofa.arklet=INFO
logging.config=classpath:log4j2-spring.xml

spring.kafka.producer.bootstrap-servers=127.0.0.1:9092
spring.kafka.bootstrap-servers=127.0.0.1:9092
spring.kafka.producer.bootstrap-servers=127.0.0.1:9092
spring.kafka.consumer.bootstrap-servers=127.0.0.1:9092
4 changes: 2 additions & 2 deletions samples/springboot3-samples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<properties>
<spring.boot.version>3.0.9</spring.boot.version>
<java.version>17</java.version>
<sofa.ark.version>2.2.4-jdk17-SNAPSHOT</sofa.ark.version>
<sofa.serverless.runtime.version>0.5.2</sofa.serverless.runtime.version>
<sofa.ark.version>3.0.1</sofa.ark.version>
<sofa.serverless.runtime.version>0.5.3-jdk17-SNAPSHOT</sofa.serverless.runtime.version>
<disruptor.version>3.4.2</disruptor.version>
<os.plugin.version>1.7.1</os.plugin.version>
<protobuf.plugin.version>0.6.1</protobuf.plugin.version>
Expand Down
15 changes: 1 addition & 14 deletions samples/springboot3-samples/web/tomcat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ base 为普通 springboot 改造成的基座,改造内容为在 pom 里增加
<groupId>com.alipay.sofa.serverless</groupId>
<artifactId>sofa-serverless-base-starter</artifactId>
<!-- 以上版本支持springboot3 -->
<version>0.5.3-jdk17</version>
<version>0.5.3-jdk17-SNAPSHOT</version>
</dependency>
<!-- end 动态模块相关依赖 -->

Expand All @@ -29,19 +29,6 @@ base 为普通 springboot 改造成的基座,改造内容为在 pom 里增加
</exclusion>
</exclusions>
</dependency>
<dependency>
<!-- 增加适配 springboot3 的 log-sofa-boot-starter 版本 -->
<groupId>com.alipay.sofa</groupId>
<artifactId>log-sofa-boot-starter</artifactId>
<version>999-not-exist</version>
<exclusions>
<!-- 排除 sofa-boot-alipay-autoconfigure -->
<exclusion>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-boot-alipay-autoconfigure</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- end 单 host 部署的依赖 -->
```

Expand Down
16 changes: 10 additions & 6 deletions samples/springboot3-samples/web/tomcat/base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<groupId>com.alipay.sofa.serverless</groupId>
<artifactId>sofa-serverless-base-starter</artifactId>
<!-- 以上版本支持springboot3 -->
<version>0.5.3-jdk17</version>
<version>0.5.3-jdk17-SNAPSHOT</version>
</dependency>
<!-- end 动态模块相关依赖 -->

Expand All @@ -53,18 +53,22 @@
</exclusions>
</dependency>
<dependency>
<!-- 增加适配 springboot3 的 log-sofa-boot-starter 版本 -->
<groupId>com.alipay.sofa</groupId>
<artifactId>log-sofa-boot-starter</artifactId>
<version>999-not-exist</version>
<version>3.9.1</version>
<exclusions>
<!-- 排除 sofa-boot-alipay-autoconfigure -->
<exclusion>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-boot-alipay-autoconfigure</artifactId>
<groupId>com.alipay.sofa.common</groupId>
<artifactId>sofa-common-tools</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<!-- 增加适配 springboot3 的 sofa-common-tools 版本 -->
<groupId>com.alipay.sofa.common</groupId>
<artifactId>sofa-common-tools</artifactId>
<version>2.0.3</version>
</dependency>
<!-- end 单 host 部署的依赖 -->
</dependencies>

Expand Down
17 changes: 17 additions & 0 deletions sofa-serverless-runtime/arklet-springboot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,23 @@
<scope>provided</scope>
</dependency>

<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>${logback.core}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.core}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
Expand Down
Loading