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
256a0d63
Commit
256a0d63
authored
Jun 27, 2019
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '1.5.x' into 2.0.x
parents
57bc03ac
1ee8c53b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
65 additions
and
51 deletions
+65
-51
spring-boot-project.setup
eclipse/spring-boot-project.setup
+1
-1
pom.xml
pom.xml
+2
-2
InitCommandTests.java
...ringframework/boot/cli/command/init/InitCommandTests.java
+8
-6
ConfigurationMetadataRepositoryJsonBuilderTests.java
...data/ConfigurationMetadataRepositoryJsonBuilderTests.java
+53
-41
build.gradle
.../spring-boot-tools/spring-boot-gradle-plugin/build.gradle
+1
-1
No files found.
eclipse/spring-boot-project.setup
View file @
256a0d63
...
@@ -59,7 +59,7 @@
...
@@ -59,7 +59,7 @@
<requirement
<requirement
name=
"org.eclipse.jdt.feature.group"
/>
name=
"org.eclipse.jdt.feature.group"
/>
<requirement
<requirement
name=
"io.spring.javaformat.eclipse.feature.feature.group"
/>
name=
"io.spring.javaformat.eclipse.feature.feature.group"
versionRange=
"[0.0.14,0.0.15)"
/>
<requirement
<requirement
name=
"org.eclipse.jst.server_adapters.feature.feature.group"
/>
name=
"org.eclipse.jst.server_adapters.feature.feature.group"
/>
<requirement
<requirement
...
...
pom.xml
View file @
256a0d63
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
</property>
</property>
</activation>
</activation>
<properties>
<properties>
<spring-javaformat.version>
0.0.1
1
</spring-javaformat.version>
<spring-javaformat.version>
0.0.1
4
</spring-javaformat.version>
<nohttp-checkstyle.version>
0.0.1.RELEASE
</nohttp-checkstyle.version>
<nohttp-checkstyle.version>
0.0.1.RELEASE
</nohttp-checkstyle.version>
</properties>
</properties>
<build>
<build>
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
<dependency>
<dependency>
<groupId>
com.puppycrawl.tools
</groupId>
<groupId>
com.puppycrawl.tools
</groupId>
<artifactId>
checkstyle
</artifactId>
<artifactId>
checkstyle
</artifactId>
<version>
8.
18
</version>
<version>
8.
22
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
io.spring.javaformat
</groupId>
<groupId>
io.spring.javaformat
</groupId>
...
...
spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/init/InitCommandTests.java
View file @
256a0d63
...
@@ -359,12 +359,14 @@ public class InitCommandTests extends AbstractHttpClientMockTests {
...
@@ -359,12 +359,14 @@ public class InitCommandTests extends AbstractHttpClientMockTests {
}
}
private
byte
[]
createFakeZipArchive
(
String
fileName
,
String
content
)
throws
IOException
{
private
byte
[]
createFakeZipArchive
(
String
fileName
,
String
content
)
throws
IOException
{
try
(
ByteArrayOutputStream
bos
=
new
ByteArrayOutputStream
();
ZipOutputStream
zos
=
new
ZipOutputStream
(
bos
))
{
try
(
ByteArrayOutputStream
bos
=
new
ByteArrayOutputStream
())
{
ZipEntry
entry
=
new
ZipEntry
(
fileName
);
try
(
ZipOutputStream
zos
=
new
ZipOutputStream
(
bos
))
{
zos
.
putNextEntry
(
entry
);
ZipEntry
entry
=
new
ZipEntry
(
fileName
);
zos
.
write
(
content
.
getBytes
());
zos
.
putNextEntry
(
entry
);
zos
.
closeEntry
();
zos
.
write
(
content
.
getBytes
());
return
bos
.
toByteArray
();
zos
.
closeEntry
();
return
bos
.
toByteArray
();
}
}
}
}
}
...
...
spring-boot-project/spring-boot-tools/spring-boot-configuration-metadata/src/test/java/org/springframework/boot/configurationmetadata/ConfigurationMetadataRepositoryJsonBuilderTests.java
View file @
256a0d63
...
@@ -62,44 +62,53 @@ public class ConfigurationMetadataRepositoryJsonBuilderTests extends AbstractCon
...
@@ -62,44 +62,53 @@ public class ConfigurationMetadataRepositoryJsonBuilderTests extends AbstractCon
@Test
@Test
public
void
severalRepositoriesNoConflict
()
throws
IOException
{
public
void
severalRepositoriesNoConflict
()
throws
IOException
{
try
(
InputStream
foo
=
getInputStreamFor
(
"foo"
);
InputStream
bar
=
getInputStreamFor
(
"bar"
))
{
try
(
InputStream
foo
=
getInputStreamFor
(
"foo"
))
{
ConfigurationMetadataRepository
repo
=
ConfigurationMetadataRepositoryJsonBuilder
.
create
(
foo
,
bar
).
build
();
try
(
InputStream
bar
=
getInputStreamFor
(
"bar"
))
{
validateFoo
(
repo
);
ConfigurationMetadataRepository
repo
=
ConfigurationMetadataRepositoryJsonBuilder
.
create
(
foo
,
bar
)
validateBar
(
repo
);
.
build
();
assertThat
(
repo
.
getAllGroups
()).
hasSize
(
2
);
validateFoo
(
repo
);
contains
(
repo
.
getAllProperties
(),
"spring.foo.name"
,
"spring.foo.description"
,
"spring.foo.counter"
,
validateBar
(
repo
);
"spring.bar.name"
,
"spring.bar.description"
,
"spring.bar.counter"
);
assertThat
(
repo
.
getAllGroups
()).
hasSize
(
2
);
assertThat
(
repo
.
getAllProperties
()).
hasSize
(
6
);
contains
(
repo
.
getAllProperties
(),
"spring.foo.name"
,
"spring.foo.description"
,
"spring.foo.counter"
,
"spring.bar.name"
,
"spring.bar.description"
,
"spring.bar.counter"
);
assertThat
(
repo
.
getAllProperties
()).
hasSize
(
6
);
}
}
}
}
}
@Test
@Test
public
void
repositoryWithRoot
()
throws
IOException
{
public
void
repositoryWithRoot
()
throws
IOException
{
try
(
InputStream
foo
=
getInputStreamFor
(
"foo"
);
InputStream
root
=
getInputStreamFor
(
"root"
))
{
try
(
InputStream
foo
=
getInputStreamFor
(
"foo"
))
{
ConfigurationMetadataRepository
repo
=
ConfigurationMetadataRepositoryJsonBuilder
.
create
(
foo
,
root
).
build
();
try
(
InputStream
root
=
getInputStreamFor
(
"root"
))
{
validateFoo
(
repo
);
ConfigurationMetadataRepository
repo
=
ConfigurationMetadataRepositoryJsonBuilder
.
create
(
foo
,
root
)
assertThat
(
repo
.
getAllGroups
()).
hasSize
(
2
);
.
build
();
validateFoo
(
repo
);
contains
(
repo
.
getAllProperties
(),
"spring.foo.name"
,
"spring.foo.description"
,
"spring.foo.counter"
,
assertThat
(
repo
.
getAllGroups
()).
hasSize
(
2
);
"spring.root.name"
,
"spring.root2.name"
);
assertThat
(
repo
.
getAllProperties
()).
hasSize
(
5
);
contains
(
repo
.
getAllProperties
(),
"spring.foo.name"
,
"spring.foo.description"
,
"spring.foo.counter"
,
"spring.root.name"
,
"spring.root2.name"
);
assertThat
(
repo
.
getAllProperties
()).
hasSize
(
5
);
}
}
}
}
}
@Test
@Test
public
void
severalRepositoriesIdenticalGroups
()
throws
IOException
{
public
void
severalRepositoriesIdenticalGroups
()
throws
IOException
{
try
(
InputStream
foo
=
getInputStreamFor
(
"foo"
);
InputStream
foo2
=
getInputStreamFor
(
"foo2"
))
{
try
(
InputStream
foo
=
getInputStreamFor
(
"foo"
))
{
ConfigurationMetadataRepository
repo
=
ConfigurationMetadataRepositoryJsonBuilder
.
create
(
foo
,
foo2
).
build
();
try
(
InputStream
foo2
=
getInputStreamFor
(
"foo2"
))
{
assertThat
(
repo
.
getAllGroups
()).
hasSize
(
1
);
ConfigurationMetadataRepository
repo
=
ConfigurationMetadataRepositoryJsonBuilder
.
create
(
foo
,
foo2
)
ConfigurationMetadataGroup
group
=
repo
.
getAllGroups
().
get
(
"spring.foo"
);
.
build
();
contains
(
group
.
getSources
(),
"org.acme.Foo"
,
"org.acme.Foo2"
,
"org.springframework.boot.FooProperties"
);
assertThat
(
repo
.
getAllGroups
()).
hasSize
(
1
);
assertThat
(
group
.
getSources
()).
hasSize
(
3
);
ConfigurationMetadataGroup
group
=
repo
.
getAllGroups
().
get
(
"spring.foo"
);
contains
(
group
.
getProperties
(),
"spring.foo.name"
,
"spring.foo.description"
,
"spring.foo.counter"
,
contains
(
group
.
getSources
(),
"org.acme.Foo"
,
"org.acme.Foo2"
,
"org.springframework.boot.FooProperties"
);
"spring.foo.enabled"
,
"spring.foo.type"
);
assertThat
(
group
.
getSources
()).
hasSize
(
3
);
assertThat
(
group
.
getProperties
()).
hasSize
(
5
);
contains
(
group
.
getProperties
(),
"spring.foo.name"
,
"spring.foo.description"
,
"spring.foo.counter"
,
contains
(
repo
.
getAllProperties
(),
"spring.foo.name"
,
"spring.foo.description"
,
"spring.foo.counter"
,
"spring.foo.enabled"
,
"spring.foo.type"
);
"spring.foo.enabled"
,
"spring.foo.type"
);
assertThat
(
group
.
getProperties
()).
hasSize
(
5
);
assertThat
(
repo
.
getAllProperties
()).
hasSize
(
5
);
contains
(
repo
.
getAllProperties
(),
"spring.foo.name"
,
"spring.foo.description"
,
"spring.foo.counter"
,
"spring.foo.enabled"
,
"spring.foo.type"
);
assertThat
(
repo
.
getAllProperties
()).
hasSize
(
5
);
}
}
}
}
}
...
@@ -116,19 +125,22 @@ public class ConfigurationMetadataRepositoryJsonBuilderTests extends AbstractCon
...
@@ -116,19 +125,22 @@ public class ConfigurationMetadataRepositoryJsonBuilderTests extends AbstractCon
@Test
@Test
public
void
builderInstancesAreIsolated
()
throws
IOException
{
public
void
builderInstancesAreIsolated
()
throws
IOException
{
try
(
InputStream
foo
=
getInputStreamFor
(
"foo"
);
InputStream
bar
=
getInputStreamFor
(
"bar"
))
{
try
(
InputStream
foo
=
getInputStreamFor
(
"foo"
))
{
ConfigurationMetadataRepositoryJsonBuilder
builder
=
ConfigurationMetadataRepositoryJsonBuilder
.
create
();
try
(
InputStream
bar
=
getInputStreamFor
(
"bar"
))
{
ConfigurationMetadataRepository
firstRepo
=
builder
.
withJsonResource
(
foo
).
build
();
ConfigurationMetadataRepositoryJsonBuilder
builder
=
ConfigurationMetadataRepositoryJsonBuilder
validateFoo
(
firstRepo
);
.
create
();
ConfigurationMetadataRepository
secondRepo
=
builder
.
withJsonResource
(
bar
).
build
();
ConfigurationMetadataRepository
firstRepo
=
builder
.
withJsonResource
(
foo
).
build
();
validateFoo
(
secondRepo
);
validateFoo
(
firstRepo
);
validateBar
(
secondRepo
);
ConfigurationMetadataRepository
secondRepo
=
builder
.
withJsonResource
(
bar
).
build
();
// first repo not impacted by second build
validateFoo
(
secondRepo
);
assertThat
(
secondRepo
).
isNotEqualTo
(
firstRepo
);
validateBar
(
secondRepo
);
assertThat
(
firstRepo
.
getAllGroups
()).
hasSize
(
1
);
// first repo not impacted by second build
assertThat
(
firstRepo
.
getAllProperties
()).
hasSize
(
3
);
assertThat
(
secondRepo
).
isNotEqualTo
(
firstRepo
);
assertThat
(
secondRepo
.
getAllGroups
()).
hasSize
(
2
);
assertThat
(
firstRepo
.
getAllGroups
()).
hasSize
(
1
);
assertThat
(
secondRepo
.
getAllProperties
()).
hasSize
(
6
);
assertThat
(
firstRepo
.
getAllProperties
()).
hasSize
(
3
);
assertThat
(
secondRepo
.
getAllGroups
()).
hasSize
(
2
);
assertThat
(
secondRepo
.
getAllProperties
()).
hasSize
(
6
);
}
}
}
}
}
...
...
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/build.gradle
View file @
256a0d63
...
@@ -4,7 +4,7 @@ buildscript {
...
@@ -4,7 +4,7 @@ buildscript {
mavenCentral
()
mavenCentral
()
}
}
dependencies
{
dependencies
{
classpath
(
"io.spring.javaformat:spring-javaformat-gradle-plugin:0.0.1
1
"
)
classpath
(
"io.spring.javaformat:spring-javaformat-gradle-plugin:0.0.1
4
"
)
}
}
}
}
...
...
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