Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
174cc2bc
Commit
174cc2bc
authored
Jul 13, 2018
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '1.5.x' into 2.0.x
parents
ed609f63
e556c04d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
72 additions
and
0 deletions
+72
-0
TypeUtils.java
...pringframework/boot/configurationprocessor/TypeUtils.java
+1
-0
ConfigurationMetadataAnnotationProcessorTests.java
...cessor/ConfigurationMetadataAnnotationProcessorTests.java
+15
-0
FieldValues.class
...rk/boot/configurationsample/fieldvalues/FieldValues.class
+0
-0
DescriptionProperties.java
...oot/configurationsample/simple/DescriptionProperties.java
+56
-0
No files found.
spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/TypeUtils.java
View file @
174cc2bc
...
...
@@ -142,6 +142,7 @@ class TypeUtils {
String
javadoc
=
(
element
!=
null
?
this
.
env
.
getElementUtils
().
getDocComment
(
element
)
:
null
);
if
(
javadoc
!=
null
)
{
javadoc
=
javadoc
.
replaceAll
(
"\\n"
,
""
);
javadoc
=
javadoc
.
trim
();
}
return
(
""
.
equals
(
javadoc
)
?
null
:
javadoc
);
...
...
spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationprocessor/ConfigurationMetadataAnnotationProcessorTests.java
View file @
174cc2bc
...
...
@@ -64,6 +64,7 @@ import org.springframework.boot.configurationsample.method.MethodAndClassConfig;
import
org.springframework.boot.configurationsample.method.SimpleMethodConfig
;
import
org.springframework.boot.configurationsample.simple.ClassWithNestedProperties
;
import
org.springframework.boot.configurationsample.simple.DeprecatedSingleProperty
;
import
org.springframework.boot.configurationsample.simple.DescriptionProperties
;
import
org.springframework.boot.configurationsample.simple.HierarchicalProperties
;
import
org.springframework.boot.configurationsample.simple.NotAnnotated
;
import
org.springframework.boot.configurationsample.simple.SimpleArrayProperties
;
...
...
@@ -210,6 +211,20 @@ public class ConfigurationMetadataAnnotationProcessorTests {
.
fromSource
(
HierarchicalProperties
.
class
));
}
@Test
public
void
descriptionProperties
()
{
ConfigurationMetadata
metadata
=
compile
(
DescriptionProperties
.
class
);
assertThat
(
metadata
).
has
(
Metadata
.
withGroup
(
"description"
)
.
fromSource
(
DescriptionProperties
.
class
));
assertThat
(
metadata
).
has
(
Metadata
.
withProperty
(
"description.simple"
,
String
.
class
)
.
fromSource
(
DescriptionProperties
.
class
)
.
withDescription
(
"A simple description."
));
assertThat
(
metadata
).
has
(
Metadata
.
withProperty
(
"description.multi-line"
,
String
.
class
)
.
fromSource
(
DescriptionProperties
.
class
).
withDescription
(
"This is a lengthy description that spans across multiple lines to showcase that the carriage return is cleaned automatically."
));
}
@Test
@SuppressWarnings
(
"deprecation"
)
public
void
deprecatedProperties
()
{
...
...
spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/fieldvalues/FieldValues.class
deleted
100644 → 0
View file @
ed609f63
File deleted
spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/simple/DescriptionProperties.java
0 → 100644
View file @
174cc2bc
/*
* Copyright 2012-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org
.
springframework
.
boot
.
configurationsample
.
simple
;
import
org.springframework.boot.configurationsample.ConfigurationProperties
;
/**
* Configuration properties with various description styles.
*
* @author Stephane Nicoll
*/
@ConfigurationProperties
(
"description"
)
public
class
DescriptionProperties
{
/**
* A simple description.
*/
private
String
simple
;
/**
* This is a lengthy description that spans across multiple lines to showcase that the
* carriage return is cleaned automatically.
*/
private
String
multiLine
;
public
String
getSimple
()
{
return
this
.
simple
;
}
public
void
setSimple
(
String
simple
)
{
this
.
simple
=
simple
;
}
public
String
getMultiLine
()
{
return
this
.
multiLine
;
}
public
void
setMultiLine
(
String
multiLine
)
{
this
.
multiLine
=
multiLine
;
}
}
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