Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
schbrain-parent
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
framework
schbrain-parent
Commits
b93dd218
Commit
b93dd218
authored
Jul 05, 2023
by
liaozan
🏀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
parent
62af3944
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
starters/dubbo-spring-boot-starter/src/main/java/com/schbrain/framework/autoconfigure/dubbo/listener/DubboConfigLoadedEventListener.java
...figure/dubbo/listener/DubboConfigLoadedEventListener.java
+4
-3
No files found.
starters/dubbo-spring-boot-starter/src/main/java/com/schbrain/framework/autoconfigure/dubbo/listener/DubboConfigLoadedEventListener.java
View file @
b93dd218
...
@@ -8,6 +8,7 @@ import com.schbrain.framework.autoconfigure.dubbo.properties.DubboProperties;
...
@@ -8,6 +8,7 @@ import com.schbrain.framework.autoconfigure.dubbo.properties.DubboProperties;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.core.Ordered
;
import
org.springframework.core.Ordered
;
import
org.springframework.core.env.ConfigurableEnvironment
;
import
static
org
.
apache
.
dubbo
.
config
.
ConfigKeys
.
DUBBO_SCAN_BASE_PACKAGES
;
import
static
org
.
apache
.
dubbo
.
config
.
ConfigKeys
.
DUBBO_SCAN_BASE_PACKAGES
;
...
@@ -29,12 +30,12 @@ public class DubboConfigLoadedEventListener extends GenericConfigLoadedEventList
...
@@ -29,12 +30,12 @@ public class DubboConfigLoadedEventListener extends GenericConfigLoadedEventList
@Override
@Override
protected
void
onConfigLoaded
(
ConfigLoadedEvent
event
,
DubboProperties
properties
)
{
protected
void
onConfigLoaded
(
ConfigLoadedEvent
event
,
DubboProperties
properties
)
{
addRequiredProperties
(
event
.
getSpringApplication
(),
event
.
getPropertySource
());
addRequiredProperties
(
event
.
get
Environment
(),
event
.
get
SpringApplication
(),
event
.
getPropertySource
());
DubboValidationInitializer
.
initialize
(
event
.
getPropertySource
());
DubboValidationInitializer
.
initialize
(
event
.
getPropertySource
());
}
}
private
void
addRequiredProperties
(
SpringApplication
application
,
OrderedMapPropertySource
propertySource
)
{
private
void
addRequiredProperties
(
ConfigurableEnvironment
environment
,
SpringApplication
application
,
OrderedMapPropertySource
propertySource
)
{
if
(!
propertySource
.
containsProperty
(
DUBBO_SCAN_BASE_PACKAGES
))
{
if
(!
environment
.
containsProperty
(
DUBBO_SCAN_BASE_PACKAGES
))
{
propertySource
.
addProperty
(
DUBBO_SCAN_BASE_PACKAGES
,
getBasePackage
(
application
));
propertySource
.
addProperty
(
DUBBO_SCAN_BASE_PACKAGES
,
getBasePackage
(
application
));
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment