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
69e96c62
Commit
69e96c62
authored
Aug 29, 2016
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
parent
97f15d60
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
13 deletions
+20
-13
BeanTypeRegistry.java
...mework/boot/autoconfigure/condition/BeanTypeRegistry.java
+6
-2
RandomAccessDataFile.java
...pringframework/boot/loader/data/RandomAccessDataFile.java
+4
-2
AbstractRunMojo.java
.../java/org/springframework/boot/maven/AbstractRunMojo.java
+8
-8
StopMojo.java
...rc/main/java/org/springframework/boot/maven/StopMojo.java
+2
-1
No files found.
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/BeanTypeRegistry.java
View file @
69e96c62
...
...
@@ -138,13 +138,17 @@ abstract class BeanTypeRegistry {
.
getBeanDefinition
(
definition
.
getFactoryBeanName
());
Class
<?>
factoryClass
=
ClassUtils
.
forName
(
factoryDefinition
.
getBeanClassName
(),
beanFactory
.
getBeanClassLoader
());
return
getFactoryMethod
(
definition
,
factoryClass
);
}
private
Method
getFactoryMethod
(
BeanDefinition
definition
,
Class
<?>
factoryClass
)
{
Method
uniqueMethod
=
null
;
for
(
Method
candidate
:
getCandidateFactoryMethods
(
definition
,
factoryClass
))
{
if
(
candidate
.
getName
().
equals
(
definition
.
getFactoryMethodName
()))
{
if
(
uniqueMethod
==
null
)
{
uniqueMethod
=
candidate
;
}
else
if
(!
matchingArgument
s
(
candidate
,
uniqueMethod
))
{
else
if
(!
hasMatchingParameterType
s
(
candidate
,
uniqueMethod
))
{
return
null
;
}
}
...
...
@@ -164,7 +168,7 @@ abstract class BeanTypeRegistry {
&&
((
AbstractBeanDefinition
)
definition
).
isNonPublicAccessAllowed
();
}
private
boolean
matchingArgument
s
(
Method
candidate
,
Method
current
)
{
private
boolean
hasMatchingParameterType
s
(
Method
candidate
,
Method
current
)
{
return
Arrays
.
equals
(
candidate
.
getParameterTypes
(),
current
.
getParameterTypes
());
}
...
...
spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/data/RandomAccessDataFile.java
View file @
69e96c62
...
...
@@ -246,8 +246,10 @@ public class RandomAccessDataFile implements RandomAccessData {
public
RandomAccessFile
acquire
()
throws
IOException
{
this
.
available
.
acquireUninterruptibly
();
RandomAccessFile
file
=
this
.
files
.
poll
();
return
(
file
==
null
?
new
RandomAccessFile
(
RandomAccessDataFile
.
this
.
file
,
"r"
)
:
file
);
if
(
file
!=
null
)
{
return
file
;
}
return
new
RandomAccessFile
(
RandomAccessDataFile
.
this
.
file
,
"r"
);
}
public
void
release
(
RandomAccessFile
file
)
{
...
...
spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java
View file @
69e96c62
...
...
@@ -64,9 +64,9 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
/**
* Add maven resources to the classpath directly, this allows live in-place editing of
* resources. Duplicate resources are removed from {@code target/classes} to prevent
* them to appear twice if {@code ClassLoader.getResources()} is called. Please
consider
*
adding {@code spring-boot-devtools} to your project instead as it provides this feature
* and many more.
* them to appear twice if {@code ClassLoader.getResources()} is called. Please
*
consider adding {@code spring-boot-devtools} to your project instead as it provides
*
this feature
and many more.
* @since 1.0
*/
@Parameter
(
property
=
"run.addResources"
,
defaultValue
=
"false"
)
...
...
@@ -90,8 +90,8 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
/**
* JVM arguments that should be associated with the forked process used to run the
* application. On command line, make sure to wrap multiple values between quotes.
* NOTE: the use of JVM arguments means that processes will be started by forking
*
a
new JVM.
* NOTE: the use of JVM arguments means that processes will be started by forking
a
* new JVM.
* @since 1.1
*/
@Parameter
(
property
=
"run.jvmArguments"
)
...
...
@@ -214,10 +214,10 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
private
void
run
(
String
startClassName
)
throws
MojoExecutionException
,
MojoFailureException
{
findAgent
();
boolean
fork
Enabled
=
isFork
();
boolean
fork
=
isFork
();
this
.
project
.
getProperties
().
setProperty
(
"_spring.boot.fork.enabled"
,
Boolean
.
toString
(
fork
Enabled
));
if
(
fork
Enabled
)
{
Boolean
.
toString
(
fork
));
if
(
fork
)
{
doRunWithForkedJvm
(
startClassName
);
}
else
{
...
...
spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/StopMojo.java
View file @
69e96c62
...
...
@@ -103,7 +103,8 @@ public class StopMojo extends AbstractMojo {
if
(
this
.
fork
!=
null
)
{
return
this
.
fork
;
}
String
property
=
this
.
project
.
getProperties
().
getProperty
(
"_spring.boot.fork.enabled"
);
String
property
=
this
.
project
.
getProperties
()
.
getProperty
(
"_spring.boot.fork.enabled"
);
return
Boolean
.
valueOf
(
property
);
}
...
...
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