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
8db1d48e
Commit
8db1d48e
authored
Jul 24, 2023
by
liaozan
🏀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no messages
parent
6d61e3a9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
19 deletions
+12
-19
starters/dubbo-spring-boot-starter/src/main/java/com/schbrain/framework/autoconfigure/dubbo/properties/DubboProperties.java
...ework/autoconfigure/dubbo/properties/DubboProperties.java
+2
-9
support/schbrain-spring-support/src/main/java/com/schbrain/framework/support/spring/env/DefaultPropertiesEnvironmentPostProcessor.java
...spring/env/DefaultPropertiesEnvironmentPostProcessor.java
+10
-10
No files found.
starters/dubbo-spring-boot-starter/src/main/java/com/schbrain/framework/autoconfigure/dubbo/properties/DubboProperties.java
View file @
8db1d48e
...
...
@@ -64,6 +64,7 @@ public class DubboProperties implements ConfigurableProperties {
return
"dubbo-common"
;
}
@Data
static
class
Scan
{
/**
...
...
@@ -73,14 +74,6 @@ public class DubboProperties implements ConfigurableProperties {
*/
private
Set
<
String
>
basePackages
=
new
LinkedHashSet
<>();
public
Set
<
String
>
getBasePackages
()
{
return
basePackages
;
}
public
void
setBasePackages
(
Set
<
String
>
basePackages
)
{
this
.
basePackages
=
basePackages
;
}
}
}
\ No newline at end of file
}
support/schbrain-spring-support/src/main/java/com/schbrain/framework/support/spring/env/DefaultPropertiesEnvironmentPostProcessor.java
View file @
8db1d48e
...
...
@@ -20,7 +20,7 @@ import org.springframework.core.env.ConfigurableEnvironment;
import
org.springframework.util.unit.DataSize
;
import
java.nio.charset.StandardCharsets
;
import
java.util.HashMap
;
import
java.util.
Linked
HashMap
;
import
java.util.Map
;
import
java.util.TimeZone
;
...
...
@@ -43,18 +43,18 @@ public class DefaultPropertiesEnvironmentPostProcessor extends LoggerAwareEnviro
@Override
public
void
postProcessEnvironment
(
ConfigurableEnvironment
environment
,
SpringApplication
application
)
{
Map
<
String
,
Object
>
defaultProperties
=
new
HashMap
<>();
Map
<
String
,
Object
>
defaultProperties
=
new
Linked
HashMap
<>();
// management
defaultProperties
.
put
(
"management.trace.http.enabled"
,
false
);
defaultProperties
.
put
(
"management.endpoints.web.exposure.include"
,
"*"
);
defaultProperties
.
put
(
"management.endpoints.enabled-by-default"
,
true
);
defaultProperties
.
put
(
"management.endpoint.health.show-details"
,
Show
.
ALWAYS
);
defaultProperties
.
put
(
"management.endpoint.health.show-components"
,
Show
.
ALWAYS
);
defaultProperties
.
put
(
"management.info.git.mode"
,
Mode
.
FULL
);
defaultProperties
.
put
(
"management.endpoint.health.show-details"
,
Show
.
ALWAYS
.
name
()
);
defaultProperties
.
put
(
"management.endpoint.health.show-components"
,
Show
.
ALWAYS
.
name
()
);
defaultProperties
.
put
(
"management.info.git.mode"
,
Mode
.
FULL
.
name
()
);
defaultProperties
.
put
(
"management.server.port"
,
PortUtils
.
findAvailablePort
(
1024
));
// servlet
defaultProperties
.
put
(
"spring.servlet.multipart.max-file-size"
,
DataSize
.
ofBytes
(-
1
));
defaultProperties
.
put
(
"spring.servlet.multipart.max-request-size"
,
DataSize
.
ofBytes
(-
1
));
defaultProperties
.
put
(
"spring.servlet.multipart.max-file-size"
,
DataSize
.
ofBytes
(-
1
)
.
toString
()
);
defaultProperties
.
put
(
"spring.servlet.multipart.max-request-size"
,
DataSize
.
ofBytes
(-
1
)
.
toString
()
);
// mvc
defaultProperties
.
put
(
"spring.mvc.throw-exception-if-no-handler-found"
,
true
);
// datetime
...
...
@@ -62,13 +62,13 @@ public class DefaultPropertiesEnvironmentPostProcessor extends LoggerAwareEnviro
defaultProperties
.
put
(
"spring.mvc.format.time"
,
DatePattern
.
NORM_TIME_PATTERN
);
defaultProperties
.
put
(
"spring.mvc.format.date-time"
,
DatePattern
.
NORM_DATETIME_PATTERN
);
defaultProperties
.
put
(
"spring.jackson.date-format"
,
DatePattern
.
NORM_DATETIME_PATTERN
);
defaultProperties
.
put
(
"spring.jackson.time-zone"
,
TimeZone
.
getDefault
());
defaultProperties
.
put
(
"spring.jackson.time-zone"
,
TimeZone
.
getDefault
()
.
getID
()
);
// others
defaultProperties
.
put
(
"spring.mandatory-file-encoding"
,
StandardCharsets
.
UTF_8
.
name
());
defaultProperties
.
put
(
"spring.web.resources.add-mappings"
,
false
);
defaultProperties
.
put
(
"spring.main.allow-circular-references"
,
true
);
defaultProperties
.
put
(
"spring.main.banner-mode"
,
Banner
.
Mode
.
OFF
);
defaultProperties
.
put
(
"server.shutdown"
,
Shutdown
.
GRACEFUL
);
defaultProperties
.
put
(
"spring.main.banner-mode"
,
Banner
.
Mode
.
OFF
.
name
()
);
defaultProperties
.
put
(
"server.shutdown"
,
Shutdown
.
GRACEFUL
.
name
()
);
// active profile
configureActiveProfileIfPresent
(
environment
,
defaultProperties
);
environment
.
setDefaultProfiles
(
EnvUtils
.
DEVELOPMENT
);
...
...
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