Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ark2.0 support Netty plugin #653

Merged
merged 7 commits into from
Nov 21, 2023
Merged

Ark2.0 support Netty plugin #653

merged 7 commits into from
Nov 21, 2023

Conversation

pmupkin
Copy link
Contributor

@pmupkin pmupkin commented May 10, 2023

Modification:
参考Tomcat的实现,对于多Biz的接口区分Netty没有使用类似Context的设计,使用了ContextPathCompositeHandler区分contextPath

Result:
Fixes #476.

@codecov
Copy link

codecov bot commented May 10, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (dce7a1c) 62.01% compared to head (a98ac3d) 60.46%.
Report is 16 commits behind head on master.

❗ Current head a98ac3d differs from pull request most recent head f627212. Consider uploading reports for the commit f627212 to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #653      +/-   ##
============================================
- Coverage     62.01%   60.46%   -1.55%     
+ Complexity      696      692       -4     
============================================
  Files           158      158              
  Lines          6252     6185      -67     
  Branches        901      886      -15     
============================================
- Hits           3877     3740     -137     
- Misses         2003     2091      +88     
+ Partials        372      354      -18     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@yuanyuancin yuanyuancin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGFM

@yuanyuancin yuanyuancin merged commit 362f9a8 into sofastack:master Nov 21, 2023
1 of 3 checks passed
lvjing2 added a commit that referenced this pull request Nov 23, 2023
lvjing2 pushed a commit that referenced this pull request Jan 11, 2024
* Ark support Netty plugin

* fix mvn issue

* fix pom issue

---------

Co-authored-by: Xuhao Wang <[email protected]>
Co-authored-by: leo james <[email protected]>
Co-authored-by: yuanyuancin <[email protected]>
(cherry picked from commit 362f9a8)
lvjing2 pushed a commit that referenced this pull request Jan 11, 2024
* Ark support Netty plugin

* fix mvn issue

* fix pom issue

---------

Co-authored-by: Xuhao Wang <[email protected]>
Co-authored-by: leo james <[email protected]>
Co-authored-by: yuanyuancin <[email protected]>

(cherry picked from commit 362f9a8)
lvjing2 added a commit that referenced this pull request Feb 1, 2024
* Ark2.0 support Netty plugin (#653)

* Ark support Netty plugin

* fix mvn issue

* fix pom issue

---------

Co-authored-by: Xuhao Wang <[email protected]>
Co-authored-by: leo james <[email protected]>
Co-authored-by: yuanyuancin <[email protected]>

(cherry picked from commit 362f9a8)

* Bump org.springframework.boot:spring-boot-starter-webflux from 2.1.0.RELEASE to 2.5.12 in /sofa-ark-plugin/netty-ark-plugin (#785)

* Bump org.springframework.boot:spring-boot-starter-webflux

Bumps [org.springframework.boot:spring-boot-starter-webflux](https://github.com/spring-projects/spring-boot) from 2.1.0.RELEASE to 2.5.12.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](spring-projects/spring-boot@v2.1.0.RELEASE...v2.5.12)

---
updated-dependencies:
- dependency-name: org.springframework.boot:spring-boot-starter-webflux
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Update pom.xml

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: leo james <[email protected]>
(cherry picked from commit 6a9f471)

* support spring cloud for base (#784)

* support .* for exclude

* support .* for exclude

* support spring cloud

* update to 2.2.5-SNAPSHOT

* remove duplicate version properties setting

* update to 2.2.5

(cherry picked from commit cefc679)

* update guava or netty (#788)

* support .* for exclude

* support .* for exclude

* update version

(cherry picked from commit ef684f6)

* Optimize to support spring webflux in ark (#798)

* extend ArkNettyReactiveWebServerFactory

* fix biz override master ReactorHttpHandlerAdapter

* fix Port in use

* fix base service faile when biz uninstalled

* fix the biz service is still accessible after biz was uninstalled

* change version to 2.2.5

* remove unuse code

* disposableServer dispose when master stopping

* fix ut,sofa-ark-springboot-starter dependent reactor-netty, change netty-handler version

* fix ci check

---------

Co-authored-by: yuanyuan <[email protected]>
Co-authored-by: leo james <[email protected]>

(cherry picked from commit 361d445)

* Create cloud_code_scan.yml (#797)

Co-authored-by: leo james <[email protected]>
(cherry picked from commit 584ac7c)

* Add a newFile method to handle file paths with spaces. (#803)

(cherry picked from commit 9c37315)

* enable override for plugin (#790)

* support .* for exclude

* support .* for exclude

* enable override for plugin

* optimize static import

* enable classpath for plugin

* add test for override

* remove unused import

* format

* update 2.2.5-SNAPSHOT

(cherry picked from commit 7de1384)

* Export plugin project classes by default (#799)

* feat: export plugin classes by default.

* feat: export plugin classes by default.

* feat: export plugin classes by default.

* feat: export plugin package by default.

* feat: export plugin package by default.

* default add all packages for plugin

* format

---------

Co-authored-by: yanhuai.yh <[email protected]>
Co-authored-by: leojames <[email protected]>
(cherry picked from commit 4ade973)

* 插件内部将参数解析成set,避免对maven版本有要求 (#805)

(cherry picked from commit a491814)

* support biz multi context for logback (#807)

Co-authored-by: yuanyuan <[email protected]>

(cherry picked from commit 52910e5)

* Add ut 1221 (#813)

* add ut

* add tests

* update test

* update format

* update test

* update jarutils test

* update tests

* update tests

* update web server test

* update tests

* update tests

* update test

* update test

* update tests

* update tests

* update format

* update tests

* update test

---------

Co-authored-by: LiuYu <[email protected]>
(cherry picked from commit bb17be2)

* Avoid biz logger context being attached early,support for logback (#816)

* Avoid biz logger context being attached early,support for logback

* format

* fix ut

---------

Co-authored-by: yuanyuan <[email protected]>
(cherry picked from commit 3fca4a6)

* default exclude pack rules (#814)

* default exclude pack rules

* formar

---------

Co-authored-by: yuanyuan <[email protected]>
Co-authored-by: leo james <[email protected]>
(cherry picked from commit 7ec6184)

* Add ut 1221 (#817)

* add ut

* add tests

* update test

* update format

* update test

* update jarutils test

* update tests

* update tests

* update web server test

* update tests

* update tests

* update test

* update test

* update tests

* update tests

* update format

* update tests

* update test

* update tests

* update test

* Delete sofa-ark-parent/core/common/C:\temp dir\b\c directory

* update test

* update test

---------

Co-authored-by: LiuYu <[email protected]>
(cherry picked from commit dfef361)

* support delegate from classLoaderHook for getResourceAsStream (#811)

* support delegate from classLoaderHook for getResourceAsStream

* rm guice-multibinding

* remove guice multi binding lib

* Revert "support delegate from classLoaderHook for getResourceAsStream"

This reverts commit 5bd306b.

* fix typo

* remove guice-multibinding

* fix format

(cherry picked from commit 3bcf96f)

* plugin default export package without activator, modify to set (#818)

* support delegate from classLoaderHook for getResourceAsStream

* Revert "support delegate from classLoaderHook for getResourceAsStream"

This reverts commit 5bd306b.

* fix typo

* plugin default export package without activator, modify to set

* fix format

(cherry picked from commit 9c5ce37)

* modify plugin export with classes as default (#819)

* support delegate from classLoaderHook for getResourceAsStream

* Revert "support delegate from classLoaderHook for getResourceAsStream"

This reverts commit 5bd306b.

* fix typo

* plugin default export package without activator, modify to set

* fix format

* export class for plugin as default

(cherry picked from commit ef9584d)

* Add ut 1221 (#820)

* add ut

* add tests

* update test

* update format

* update test

* update jarutils test

* update tests

* update tests

* update web server test

* update tests

* update tests

* update test

* update test

* update tests

* update tests

* update format

* update tests

* update test

* update tests

* update test

* Delete sofa-ark-parent/core/common/C:\temp dir\b\c directory

* update test

* update test

* update tesst

* update test

* update test

* update test

* update test

* update test

* update test

* update test

---------

Co-authored-by: LiuYu <[email protected]>
(cherry picked from commit c3192d0)

* 1. update 2.2.7-SNAPSHOT (#823)

2. support SpringBoot 3.2.0 new LaunchedURLClassLoader class

Co-authored-by: 致节 <[email protected]>

(cherry picked from commit 11f5507)

* Add ut 1221 (#824)

* add ut

* add tests

* update test

* update format

* update test

* update jarutils test

* update tests

* update tests

* update web server test

* update tests

* update tests

* update test

* update test

* update tests

* update tests

* update format

* update tests

* update test

* update tests

* update test

* Delete sofa-ark-parent/core/common/C:\temp dir\b\c directory

* update test

* update test

* update tesst

* update test

* update test

* update test

* update test

* update test

* update test

* update test

* update test

* update test

* update test

* update test

---------

Co-authored-by: LiuYu <[email protected]>
(cherry picked from commit bc52a4c)

* update javadoc to support multi jdk env

* ut for the target jdk17 branch

* update logback

* remove logback context selector adapter, cause it had beed abandoned by qos-ch/logback#765

* fix autoconfiguration

* ark logger lazy init (#829)

* support delegate from classLoaderHook for getResourceAsStream

* Revert "support delegate from classLoaderHook for getResourceAsStream"

This reverts commit 5bd306b.

* fix typo

* plugin default export package without activator, modify to set

* fix format

* export class for plugin as default

* update to 2.2.6

* ark logger lazy init

* format

(cherry picked from commit 368a8be)

* fix windows mvn goal parse (#831)

* update to 2.2.7

* fix windows mvn goal parse

(cherry picked from commit 6a97493)

* enable sub bundle pom analysis first

* remove unused imports

(cherry picked from commit b3133d4)

* modify github to httpbin

(cherry picked from commit f8d2b07)

* support run mvn tree in test

(cherry picked from commit 34580be)

* 支持对tomcat进行配置 (#839)

Co-authored-by: 巨鹿 <[email protected]>

(cherry picked from commit 1b2ac68)

* Update inactive_issues_robot.yml (#840)

(cherry picked from commit 4f8c7d6)

* modify test for zip fill to support jdk9+

* fix export import config

* support multi sdk

* format test

* add guice lib

---------

Co-authored-by: FanYang <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: yuanyuancin <[email protected]>
Co-authored-by: Duan-0916 <[email protected]>
Co-authored-by: FlyAbner <[email protected]>
Co-authored-by: Yan Huai <[email protected]>
Co-authored-by: Liu Jing <[email protected]>
Co-authored-by: lylingzhen <[email protected]>
Co-authored-by: HzjNeverStop <[email protected]>
Co-authored-by: 巨鹿 <[email protected]>
lvjing2 added a commit that referenced this pull request Feb 1, 2024
* Suit 3.2.0 (#789)

* suit sprignboot 3.2.0

* suit springboot 3.2.0

---------

Co-authored-by: 致节 <[email protected]>

* Ark2.0 support Netty plugin (#653)

* Ark support Netty plugin

* fix mvn issue

* fix pom issue

---------

Co-authored-by: Xuhao Wang <[email protected]>
Co-authored-by: leo james <[email protected]>
Co-authored-by: yuanyuancin <[email protected]>

(cherry picked from commit 362f9a8)

* Bump org.springframework.boot:spring-boot-starter-webflux from 2.1.0.RELEASE to 2.5.12 in /sofa-ark-plugin/netty-ark-plugin (#785)

* Bump org.springframework.boot:spring-boot-starter-webflux

Bumps [org.springframework.boot:spring-boot-starter-webflux](https://github.com/spring-projects/spring-boot) from 2.1.0.RELEASE to 2.5.12.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](spring-projects/spring-boot@v2.1.0.RELEASE...v2.5.12)

---
updated-dependencies:
- dependency-name: org.springframework.boot:spring-boot-starter-webflux
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Update pom.xml

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: leo james <[email protected]>
(cherry picked from commit 6a9f471)

* support spring cloud for base (#784)

* support .* for exclude

* support .* for exclude

* support spring cloud

* update to 2.2.5-SNAPSHOT

* remove duplicate version properties setting

* update to 2.2.5

(cherry picked from commit cefc679)

* update guava or netty (#788)

* support .* for exclude

* support .* for exclude

* update version

(cherry picked from commit ef684f6)

* Optimize to support spring webflux in ark (#798)

* extend ArkNettyReactiveWebServerFactory

* fix biz override master ReactorHttpHandlerAdapter

* fix Port in use

* fix base service faile when biz uninstalled

* fix the biz service is still accessible after biz was uninstalled

* change version to 2.2.5

* remove unuse code

* disposableServer dispose when master stopping

* fix ut,sofa-ark-springboot-starter dependent reactor-netty, change netty-handler version

* fix ci check

---------

Co-authored-by: yuanyuan <[email protected]>
Co-authored-by: leo james <[email protected]>

(cherry picked from commit 361d445)

* Create cloud_code_scan.yml (#797)

Co-authored-by: leo james <[email protected]>
(cherry picked from commit 584ac7c)

* Add a newFile method to handle file paths with spaces. (#803)

(cherry picked from commit 9c37315)

* enable override for plugin (#790)

* support .* for exclude

* support .* for exclude

* enable override for plugin

* optimize static import

* enable classpath for plugin

* add test for override

* remove unused import

* format

* update 2.2.5-SNAPSHOT

(cherry picked from commit 7de1384)

* Export plugin project classes by default (#799)

* feat: export plugin classes by default.

* feat: export plugin classes by default.

* feat: export plugin classes by default.

* feat: export plugin package by default.

* feat: export plugin package by default.

* default add all packages for plugin

* format

---------

Co-authored-by: yanhuai.yh <[email protected]>
Co-authored-by: leojames <[email protected]>
(cherry picked from commit 4ade973)

* 插件内部将参数解析成set,避免对maven版本有要求 (#805)

(cherry picked from commit a491814)

* support biz multi context for logback (#807)

Co-authored-by: yuanyuan <[email protected]>

(cherry picked from commit 52910e5)

* Add ut 1221 (#813)

* add ut

* add tests

* update test

* update format

* update test

* update jarutils test

* update tests

* update tests

* update web server test

* update tests

* update tests

* update test

* update test

* update tests

* update tests

* update format

* update tests

* update test

---------

Co-authored-by: LiuYu <[email protected]>
(cherry picked from commit bb17be2)

* Avoid biz logger context being attached early,support for logback (#816)

* Avoid biz logger context being attached early,support for logback

* format

* fix ut

---------

Co-authored-by: yuanyuan <[email protected]>
(cherry picked from commit 3fca4a6)

* default exclude pack rules (#814)

* default exclude pack rules

* formar

---------

Co-authored-by: yuanyuan <[email protected]>
Co-authored-by: leo james <[email protected]>
(cherry picked from commit 7ec6184)

* Add ut 1221 (#817)

* add ut

* add tests

* update test

* update format

* update test

* update jarutils test

* update tests

* update tests

* update web server test

* update tests

* update tests

* update test

* update test

* update tests

* update tests

* update format

* update tests

* update test

* update tests

* update test

* Delete sofa-ark-parent/core/common/C:\temp dir\b\c directory

* update test

* update test

---------

Co-authored-by: LiuYu <[email protected]>
(cherry picked from commit dfef361)

* support delegate from classLoaderHook for getResourceAsStream (#811)

* support delegate from classLoaderHook for getResourceAsStream

* rm guice-multibinding

* remove guice multi binding lib

* Revert "support delegate from classLoaderHook for getResourceAsStream"

This reverts commit 5bd306b.

* fix typo

* remove guice-multibinding

* fix format

(cherry picked from commit 3bcf96f)

* plugin default export package without activator, modify to set (#818)

* support delegate from classLoaderHook for getResourceAsStream

* Revert "support delegate from classLoaderHook for getResourceAsStream"

This reverts commit 5bd306b.

* fix typo

* plugin default export package without activator, modify to set

* fix format

(cherry picked from commit 9c5ce37)

* modify plugin export with classes as default (#819)

* support delegate from classLoaderHook for getResourceAsStream

* Revert "support delegate from classLoaderHook for getResourceAsStream"

This reverts commit 5bd306b.

* fix typo

* plugin default export package without activator, modify to set

* fix format

* export class for plugin as default

(cherry picked from commit ef9584d)

* Add ut 1221 (#820)

* add ut

* add tests

* update test

* update format

* update test

* update jarutils test

* update tests

* update tests

* update web server test

* update tests

* update tests

* update test

* update test

* update tests

* update tests

* update format

* update tests

* update test

* update tests

* update test

* Delete sofa-ark-parent/core/common/C:\temp dir\b\c directory

* update test

* update test

* update tesst

* update test

* update test

* update test

* update test

* update test

* update test

* update test

---------

Co-authored-by: LiuYu <[email protected]>
(cherry picked from commit c3192d0)

* 1. update 2.2.7-SNAPSHOT (#823)

2. support SpringBoot 3.2.0 new LaunchedURLClassLoader class

Co-authored-by: 致节 <[email protected]>

(cherry picked from commit 11f5507)

* Add ut 1221 (#824)

* add ut

* add tests

* update test

* update format

* update test

* update jarutils test

* update tests

* update tests

* update web server test

* update tests

* update tests

* update test

* update test

* update tests

* update tests

* update format

* update tests

* update test

* update tests

* update test

* Delete sofa-ark-parent/core/common/C:\temp dir\b\c directory

* update test

* update test

* update tesst

* update test

* update test

* update test

* update test

* update test

* update test

* update test

* update test

* update test

* update test

* update test

---------

Co-authored-by: LiuYu <[email protected]>
(cherry picked from commit bc52a4c)

* update javadoc to support multi jdk env

* ut for the target jdk17 branch

* update logback

* remove logback context selector adapter, cause it had beed abandoned by qos-ch/logback#765

* fix autoconfiguration

* ark logger lazy init (#829)

* support delegate from classLoaderHook for getResourceAsStream

* Revert "support delegate from classLoaderHook for getResourceAsStream"

This reverts commit 5bd306b.

* fix typo

* plugin default export package without activator, modify to set

* fix format

* export class for plugin as default

* update to 2.2.6

* ark logger lazy init

* format

(cherry picked from commit 368a8be)

* fix windows mvn goal parse (#831)

* update to 2.2.7

* fix windows mvn goal parse

(cherry picked from commit 6a97493)

* enable sub bundle pom analysis first

* commit

* add etst

* remove unused imports

(cherry picked from commit b3133d4)

* modify github to httpbin

(cherry picked from commit f8d2b07)

* support run mvn tree in test

(cherry picked from commit 34580be)

* log version

* remove log sofa boot starter

* 支持对tomcat进行配置 (#839)

Co-authored-by: 巨鹿 <[email protected]>

(cherry picked from commit 1b2ac68)

* unit etst

* unit test

* add unit test

* add unit test

* resove application.properties extension

* Update inactive_issues_robot.yml (#840)

(cherry picked from commit 4f8c7d6)

* modify test for zip fill to support jdk9+

* add unit test

* add comment

* fix export import config

* support multi sdk

* format test

* add guice lib

* remove module slimming

* inner test class

* unit test

* commit

* adjust package postion

* unit test

* update version

---------

Co-authored-by: HzjNeverStop <[email protected]>
Co-authored-by: 致节 <[email protected]>
Co-authored-by: FanYang <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: leo james <[email protected]>
Co-authored-by: yuanyuancin <[email protected]>
Co-authored-by: Duan-0916 <[email protected]>
Co-authored-by: FlyAbner <[email protected]>
Co-authored-by: Yan Huai <[email protected]>
Co-authored-by: Liu Jing <[email protected]>
Co-authored-by: lylingzhen <[email protected]>
Co-authored-by: chaya.cy <[email protected]>
Co-authored-by: 巨鹿 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

源码解析:Ark2.0 支持 Netty 插件
4 participants