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
0232bef8
Commit
0232bef8
authored
Feb 26, 2016
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'sfw-4.3'
parents
9bf95c42
fa7dfb51
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
13 deletions
+16
-13
pom.xml
spring-boot-dependencies/pom.xml
+1
-1
SampleWebSocketsApplicationTests.java
.../websocket/undertow/SampleWebSocketsApplicationTests.java
+2
-0
CustomContainerWebSocketsApplicationTests.java
...ertow/echo/CustomContainerWebSocketsApplicationTests.java
+2
-0
BeanCurrentlyInCreationFailureAnalyzer.java
...tics/analyzer/BeanCurrentlyInCreationFailureAnalyzer.java
+10
-11
BeanCurrentlyInCreationFailureAnalyzerTests.java
...analyzer/BeanCurrentlyInCreationFailureAnalyzerTests.java
+1
-1
No files found.
spring-boot-dependencies/pom.xml
View file @
0232bef8
...
...
@@ -128,7 +128,7 @@
<snakeyaml.version>
1.17
</snakeyaml.version>
<solr.version>
5.3.2
</solr.version>
<spock.version>
1.0-groovy-2.4
</spock.version>
<spring.version>
4.
2.5.RELEASE
</spring.version>
<spring.version>
4.
3.0.BUILD-SNAPSHOT
</spring.version>
<spring-amqp.version>
1.6.0.M1
</spring-amqp.version>
<spring-cloud-connectors.version>
1.2.1.RELEASE
</spring-cloud-connectors.version>
<spring-batch.version>
3.0.6.RELEASE
</spring-batch.version>
...
...
spring-boot-samples/spring-boot-sample-websocket-undertow/src/test/java/samples/websocket/undertow/SampleWebSocketsApplicationTests.java
View file @
0232bef8
...
...
@@ -22,6 +22,7 @@ import java.util.concurrent.atomic.AtomicReference;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
import
org.junit.Ignore
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
samples.websocket.undertow.client.GreetingService
;
...
...
@@ -56,6 +57,7 @@ public class SampleWebSocketsApplicationTests {
private
int
port
=
1234
;
@Test
@Ignore
(
"UNDERTOW-639"
)
public
void
echoEndpoint
()
throws
Exception
{
ConfigurableApplicationContext
context
=
new
SpringApplicationBuilder
(
ClientConfiguration
.
class
,
PropertyPlaceholderAutoConfiguration
.
class
)
...
...
spring-boot-samples/spring-boot-sample-websocket-undertow/src/test/java/samples/websocket/undertow/echo/CustomContainerWebSocketsApplicationTests.java
View file @
0232bef8
...
...
@@ -22,6 +22,7 @@ import java.util.concurrent.atomic.AtomicReference;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
import
org.junit.Ignore
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
samples.websocket.undertow.SampleUndertowWebSocketsApplication
;
...
...
@@ -62,6 +63,7 @@ public class CustomContainerWebSocketsApplicationTests {
private
static
int
PORT
=
SocketUtils
.
findAvailableTcpPort
();
@Test
@Ignore
(
"UNDERTOW-639"
)
public
void
echoEndpoint
()
throws
Exception
{
ConfigurableApplicationContext
context
=
new
SpringApplicationBuilder
(
ClientConfiguration
.
class
,
PropertyPlaceholderAutoConfiguration
.
class
)
...
...
spring-boot/src/main/java/org/springframework/boot/diagnostics/analyzer/BeanCurrentlyInCreationFailureAnalyzer.java
View file @
0232bef8
...
...
@@ -21,6 +21,8 @@ import java.util.List;
import
org.springframework.beans.factory.BeanCreationException
;
import
org.springframework.beans.factory.BeanCurrentlyInCreationException
;
import
org.springframework.beans.factory.InjectionPoint
;
import
org.springframework.beans.factory.UnsatisfiedDependencyException
;
import
org.springframework.boot.diagnostics.AbstractFailureAnalyzer
;
import
org.springframework.boot.diagnostics.FailureAnalysis
;
import
org.springframework.util.StringUtils
;
...
...
@@ -34,8 +36,6 @@ import org.springframework.util.StringUtils;
class
BeanCurrentlyInCreationFailureAnalyzer
extends
AbstractFailureAnalyzer
<
BeanCurrentlyInCreationException
>
{
private
static
final
String
FIELD_AUTOWIRING_FAILURE_MESSAGE_PREFIX
=
"Could not autowire field: "
;
@Override
protected
FailureAnalysis
analyze
(
Throwable
rootFailure
,
BeanCurrentlyInCreationException
cause
)
{
...
...
@@ -66,19 +66,18 @@ class BeanCurrentlyInCreationFailureAnalyzer
if
(
StringUtils
.
hasText
(
ex
.
getResourceDescription
()))
{
return
String
.
format
(
" defined in %s"
,
ex
.
getResourceDescription
());
}
if
(
causedByFieldAutowiringFailure
(
ex
))
{
return
String
.
format
(
" (field %s)"
,
ex
.
getCause
().
getMessage
().
substring
(
FIELD_AUTOWIRING_FAILURE_MESSAGE_PREFIX
.
length
(),
ex
.
getCause
().
getMessage
().
indexOf
(
";"
)));
InjectionPoint
failedInjectionPoint
=
findFailedInjectionPoint
(
ex
);
if
(
failedInjectionPoint
!=
null
&&
failedInjectionPoint
.
getField
()
!=
null
)
{
return
String
.
format
(
" (field %s)"
,
failedInjectionPoint
.
getField
());
}
return
""
;
}
private
boolean
causedByFieldAutowiringFailure
(
BeanCreationException
ex
)
{
return
ex
.
getCause
()
instanceof
BeanCreationException
&&
ex
.
getCause
()
.
getMessage
().
startsWith
(
FIELD_AUTOWIRING_FAILURE_MESSAGE_PREFIX
);
private
InjectionPoint
findFailedInjectionPoint
(
BeanCreationException
ex
)
{
if
(!(
ex
instanceof
UnsatisfiedDependencyException
))
{
return
null
;
}
return
((
UnsatisfiedDependencyException
)
ex
).
getInjectionPoint
();
}
}
spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/BeanCurrentlyInCreationFailureAnalyzerTests.java
View file @
0232bef8
...
...
@@ -57,7 +57,7 @@ public class BeanCurrentlyInCreationFailureAnalyzerTests {
assertThat
(
analysis
.
getDescription
()).
startsWith
(
"There is a circular dependency between 3 beans in the application context:"
);
assertThat
(
analysis
.
getDescription
()).
contains
(
"three defined in "
+
CycleWithAutowiredFields
.
BeanThreeConfiguration
.
class
);
+
CycleWithAutowiredFields
.
BeanThreeConfiguration
.
class
.
getName
()
);
assertThat
(
analysis
.
getDescription
())
.
contains
(
"one defined in "
+
CycleWithAutowiredFields
.
class
.
getName
());
assertThat
(
analysis
.
getDescription
())
...
...
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