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

Native Support Springboot3 #12072

Merged
merged 20 commits into from
Apr 25, 2023
Merged

Conversation

CrazyHZM
Copy link
Member

@CrazyHZM CrazyHZM commented Apr 11, 2023

What is the purpose of the change

  1. Support annotations and xml in native image scenarios
  2. Support native combination with springboot3
  3. Support automatic scanning of exposed services and referenced services in the way of spring configuration, and generate native image configuration files according to the scanning results.

Brief changelog

  1. The original native image judgment method is abolished, and the standard image code is used to judge whether it is executed in the native environment
  2. dubbo will be compiled in jdk17 environment
  3. In native image mode: JSON and the corresponding implementation are automatically loaded and compiled through spi, and renamed to JsonUtil
  4. Support automatic identification of higher version of PostProcessor, used to complete AOT in compilation stage, such as ServiceAnnotationWithAotPostProcessor and ServiceAnnotationWithAotPostProcessor.
  5. Support API to inject native image configuration information required for compilation, which is used to temporarily solve the problem that third-party packages do not support native image

Verifying this change

Checklist

  • Make sure there is a GitHub_issue field for the change (usually before you start working on it). Trivial changes like typos do not require a GitHub issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Check if is necessary to patch to Dubbo 3 if you are work on Dubbo 2.7
  • Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
  • Add some description to dubbo-website project if you are requesting to add a feature.
  • GitHub Actions works fine on your own branch.
  • If this contribution is large, please follow the Software Donation Guide.

CrazyHZM added 17 commits April 10, 2023 12:54
Signed-off-by: crazyhzm <crazyhzm@gmail.com>
Signed-off-by: crazyhzm <crazyhzm@gmail.com>
Signed-off-by: crazyhzm <crazyhzm@gmail.com>
Signed-off-by: crazyhzm <crazyhzm@gmail.com>
Signed-off-by: crazyhzm <crazyhzm@gmail.com>
Signed-off-by: crazyhzm <crazyhzm@gmail.com>
Signed-off-by: crazyhzm <crazyhzm@gmail.com>
Signed-off-by: crazyhzm <crazyhzm@gmail.com>
Signed-off-by: crazyhzm <crazyhzm@gmail.com>
# Conflicts:
#	dubbo-common/src/main/java/org/apache/dubbo/common/json/impl/JacksonImpl.java
#	dubbo-common/src/main/java/org/apache/dubbo/common/utils/JsonUtils.java
Signed-off-by: crazyhzm <crazyhzm@gmail.com>
Signed-off-by: crazyhzm <crazyhzm@gmail.com>
Signed-off-by: crazyhzm <crazyhzm@gmail.com>
Signed-off-by: crazyhzm <crazyhzm@gmail.com>
Signed-off-by: crazyhzm <crazyhzm@gmail.com>
Signed-off-by: crazyhzm <crazyhzm@gmail.com>
@CrazyHZM CrazyHZM changed the base branch from 3.2 to 3.3 April 14, 2023 06:49
Signed-off-by: crazyhzm <crazyhzm@gmail.com>
Signed-off-by: crazyhzm <crazyhzm@gmail.com>
# Conflicts:
#	dubbo-test/dubbo-test-modules/src/test/java/org/apache/dubbo/dependency/FileTest.java
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 99 Code Smells

11.7% 11.7% Coverage
12.9% 12.9% Duplication

@codecov-commenter
Copy link

Codecov Report

Merging #12072 (0d842f0) into 3.3 (13558a8) will decrease coverage by 2.90%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##                3.3   #12072      +/-   ##
============================================
- Coverage     69.38%   66.48%   -2.90%     
+ Complexity        5        3       -2     
============================================
  Files          1594     1747     +153     
  Lines         65730    69450    +3720     
  Branches       9563     9866     +303     
============================================
+ Hits          45609    46177     +568     
- Misses        15745    18832    +3087     
- Partials       4376     4441      +65     

see 218 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@AlbumenJ
Copy link
Member

Could you please provide a proposal of this PR

@CrazyHZM
Copy link
Member Author

Could you please provide a proposal of this PR

Done

@AlbumenJ AlbumenJ merged commit 6c8f79c into apache:3.3 Apr 25, 2023
CrazyHZM added a commit to CrazyHZM/dubbo that referenced this pull request May 17, 2023
* Support native with springboot3

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* fix checkstyle

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* remove useless imports

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* remove useless imports

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* change java version of  build-source actions to jdk17

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* dubbo-serialization-fastjson2 support native

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* fix xml config

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* fix singleton bean

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* ignore test

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* ignore dubbo-config-spring6 module in dubbo all

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* remove @ignore

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* add dubbo-config-spring6 to dubbo-bom

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* add dubbo-config-spring6 to dubbo-test

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* add transformer

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* ignore  dubbo-config-spring6

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* fix JsonUtilsTest

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* fix JsonUtilsTest

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

---------

Signed-off-by: crazyhzm <crazyhzm@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants