Skip to content

Commit

Permalink
Work around the behaviour change in latest Spring 4.2 snapshots
Browse files Browse the repository at this point in the history
The changes made in spring-projects/spring-framework@e403aefe cause
SampleTomcatTwoConnectorsApplication to fail to launch. The port bean,
typed as an int, is coerced into an Integer when the bean’s created. The
port() method is then called, and the proxy’s bean method interceptor
complains as it’s expecting the port bean to be an int but it’s actually
an Integer. Changing the port() bean method’s return type to Integer
works around the problem.
  • Loading branch information
wilkinsona committed Apr 16, 2015
1 parent 54e12a0 commit 2085a5b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
public class SampleTomcatTwoConnectorsApplication {

@Bean
public int port() {
public Integer port() {
return SocketUtils.findAvailableTcpPort();
}

Expand Down

0 comments on commit 2085a5b

Please sign in to comment.