Skip to content

Commit b2db6ac

Browse files
committed
Update to latest versions
1 parent 50f9061 commit b2db6ac

File tree

17 files changed

+137
-25
lines changed

17 files changed

+137
-25
lines changed

benchmarks/pom.xml

+2-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<parent>
1515
<groupId>org.springframework.boot</groupId>
1616
<artifactId>spring-boot-starter-parent</artifactId>
17-
<version>1.5.9.RELEASE</version>
17+
<version>2.1.1.RELEASE</version>
1818
<relativePath /> <!-- lookup parent from repository -->
1919
</parent>
2020

@@ -23,8 +23,7 @@
2323
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
2424
<java.version>1.8</java.version>
2525
<jmh.version>1.16</jmh.version>
26-
<thin-jar.version>1.0.7.RELEASE</thin-jar.version>
27-
<aspectj.version>1.8.13</aspectj.version>
26+
<thin-jar.version>1.0.20.RELEASE</thin-jar.version>
2827
<start-class>org.openjdk.jmh.Main</start-class>
2928
</properties>
3029

ctw/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
<parent>
1515
<groupId>org.springframework.boot</groupId>
1616
<artifactId>spring-boot-starter-parent</artifactId>
17-
<version>1.5.9.RELEASE</version>
17+
<version>2.1.1.RELEASE</version>
1818
<relativePath /> <!-- lookup parent from repository -->
1919
</parent>
2020

2121
<properties>
2222
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2323
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
2424
<java.version>1.8</java.version>
25-
<thin-jar.version>1.0.5.RELEASE</thin-jar.version>
25+
<thin-jar.version>1.0.20.RELEASE</thin-jar.version>
2626
</properties>
2727

2828
<dependencies>

ltw/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
<parent>
1515
<groupId>org.springframework.boot</groupId>
1616
<artifactId>spring-boot-starter-parent</artifactId>
17-
<version>1.5.9.RELEASE</version>
17+
<version>2.1.1.RELEASE</version>
1818
<relativePath /> <!-- lookup parent from repository -->
1919
</parent>
2020

2121
<properties>
2222
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2323
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
2424
<java.version>1.8</java.version>
25-
<thin-jar.version>1.0.5.RELEASE</thin-jar.version>
25+
<thin-jar.version>1.0.20.RELEASE</thin-jar.version>
2626
</properties>
2727

2828
<dependencies>

multi-ctw/app/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
<parent>
1515
<groupId>org.springframework.boot</groupId>
1616
<artifactId>spring-boot-starter-parent</artifactId>
17-
<version>1.5.9.RELEASE</version>
17+
<version>2.1.1.RELEASE</version>
1818
<relativePath /> <!-- lookup parent from repository -->
1919
</parent>
2020

2121
<properties>
2222
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2323
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
2424
<java.version>1.8</java.version>
25-
<thin-jar.version>1.0.5.RELEASE</thin-jar.version>
25+
<thin-jar.version>1.0.20.RELEASE</thin-jar.version>
2626
<spring-boot-aspects.version>1.0.0.BUILD-SNAPSHOT</spring-boot-aspects.version>
2727
</properties>
2828

multi-ctw/aspects/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
<parent>
1515
<groupId>org.springframework.boot</groupId>
1616
<artifactId>spring-boot-starter-parent</artifactId>
17-
<version>1.5.9.RELEASE</version>
17+
<version>2.1.1.RELEASE</version>
1818
<relativePath /> <!-- lookup parent from repository -->
1919
</parent>
2020

2121
<properties>
2222
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2323
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
2424
<java.version>1.8</java.version>
25-
<thin-jar.version>1.0.5.RELEASE</thin-jar.version>
25+
<thin-jar.version>1.0.20.RELEASE</thin-jar.version>
2626
</properties>
2727

2828
<dependencies>

multi-ctw/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.springframework.boot</groupId>
77
<artifactId>spring-boot-starter-parent</artifactId>
8-
<version>1.5.9.RELEASE</version>
8+
<version>2.1.1.RELEASE</version>
99
</parent>
1010

1111
<groupId>com.example</groupId>

multi-ltw/app/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
<parent>
1515
<groupId>org.springframework.boot</groupId>
1616
<artifactId>spring-boot-starter-parent</artifactId>
17-
<version>1.5.9.RELEASE</version>
17+
<version>2.1.1.RELEASE</version>
1818
<relativePath /> <!-- lookup parent from repository -->
1919
</parent>
2020

2121
<properties>
2222
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2323
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
2424
<java.version>1.8</java.version>
25-
<thin-jar.version>1.0.5.RELEASE</thin-jar.version>
25+
<thin-jar.version>1.0.20.RELEASE</thin-jar.version>
2626
<spring-boot-aspects.version>1.0.0.BUILD-SNAPSHOT</spring-boot-aspects.version>
2727
</properties>
2828

multi-ltw/aspects/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
<parent>
1515
<groupId>org.springframework.boot</groupId>
1616
<artifactId>spring-boot-starter-parent</artifactId>
17-
<version>1.5.9.RELEASE</version>
17+
<version>2.1.1.RELEASE</version>
1818
<relativePath /> <!-- lookup parent from repository -->
1919
</parent>
2020

2121
<properties>
2222
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2323
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
2424
<java.version>1.8</java.version>
25-
<thin-jar.version>1.0.5.RELEASE</thin-jar.version>
25+
<thin-jar.version>1.0.20.RELEASE</thin-jar.version>
2626
</properties>
2727

2828
<dependencies>

multi-ltw/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.springframework.boot</groupId>
77
<artifactId>spring-boot-starter-parent</artifactId>
8-
<version>1.5.9.RELEASE</version>
8+
<version>2.1.1.RELEASE</version>
99
</parent>
1010

1111
<groupId>com.example</groupId>

mvnw

+21-1
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,28 @@ export MAVEN_CMD_LINE_ARGS
226226

227227
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
228228

229+
echo "Running version check"
230+
VERSION=$( sed '\!<parent!,\!</parent!d' `dirname $0`/pom.xml | grep '<version' | head -1 | sed -e 's/.*<version>//' -e 's!</version>.*$!!' )
231+
echo "The found version is [${VERSION}]"
232+
233+
if echo $VERSION | egrep -q 'M|RC'; then
234+
echo Activating \"milestone\" profile for version=\"$VERSION\"
235+
echo $MAVEN_ARGS | grep -q milestone || MAVEN_ARGS="$MAVEN_ARGS -Pmilestone"
236+
else
237+
echo Deactivating \"milestone\" profile for version=\"$VERSION\"
238+
echo $MAVEN_ARGS | grep -q milestone && MAVEN_ARGS=$(echo $MAVEN_ARGS | sed -e 's/-Pmilestone//')
239+
fi
240+
241+
if echo $VERSION | egrep -q 'RELEASE'; then
242+
echo Activating \"central\" profile for version=\"$VERSION\"
243+
echo $MAVEN_ARGS | grep -q milestone || MAVEN_ARGS="$MAVEN_ARGS -Pcentral"
244+
else
245+
echo Deactivating \"central\" profile for version=\"$VERSION\"
246+
echo $MAVEN_ARGS | grep -q central && MAVEN_ARGS=$(echo $MAVEN_ARGS | sed -e 's/-Pcentral//')
247+
fi
248+
229249
exec "$JAVACMD" \
230250
$MAVEN_OPTS \
231251
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
232252
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
233-
${WRAPPER_LAUNCHER} "$@"
253+
${WRAPPER_LAUNCHER} ${MAVEN_ARGS} "$@"

mvnw.cmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,4 +142,4 @@ if "%MAVEN_BATCH_PAUSE%" == "on" pause
142142

143143
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
144144

145-
exit /B %ERROR_CODE%
145+
exit /B %ERROR_CODE%

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.springframework.boot</groupId>
77
<artifactId>spring-boot-starter-parent</artifactId>
8-
<version>1.5.9.RELEASE</version>
8+
<version>2.1.1.RELEASE</version>
99
</parent>
1010

1111
<groupId>com.example</groupId>

spring/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
<parent>
1515
<groupId>org.springframework.boot</groupId>
1616
<artifactId>spring-boot-starter-parent</artifactId>
17-
<version>1.5.9.RELEASE</version>
17+
<version>2.1.1.RELEASE</version>
1818
<relativePath /> <!-- lookup parent from repository -->
1919
</parent>
2020

2121
<properties>
2222
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2323
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
2424
<java.version>1.8</java.version>
25-
<thin-jar.version>1.0.5.RELEASE</thin-jar.version>
25+
<thin-jar.version>1.0.20.RELEASE</thin-jar.version>
2626
</properties>
2727

2828
<dependencies>

spring/src/main/java/com/example/Interceptor.java

+8-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,14 @@ public Object intercept(ProceedingJoinPoint joinPoint) throws Throwable {
3333
System.err.println(joinPoint.toShortString() + ": " + result);
3434
return result;
3535
}
36-
36+
37+
@Around("execution(* *.*(..)) && within(com.example..*)")
38+
public Object another(ProceedingJoinPoint joinPoint) throws Throwable {
39+
Object result = joinPoint.proceed();
40+
System.err.println(joinPoint.toShortString() + ": " + result);
41+
return result;
42+
}
43+
3744
@EventListener
3845
public void started(ContextRefreshedEvent event) {
3946
System.err.println(message + ": " + event);

timing/pom.xml

+51-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<parent>
1515
<groupId>org.springframework.boot</groupId>
1616
<artifactId>spring-boot-starter-parent</artifactId>
17-
<version>1.5.9.RELEASE</version>
17+
<version>2.1.1.RELEASE</version>
1818
<relativePath /> <!-- lookup parent from repository -->
1919
</parent>
2020

@@ -41,4 +41,54 @@
4141
</dependency>
4242
</dependencies>
4343

44+
<distributionManagement>
45+
<downloadUrl>https://github.com/dsyer/spring-boot-aspectj</downloadUrl>
46+
<site>
47+
<id>spring-docs</id>
48+
<url>scp://static.springframework.org/var/www/domains/springframework.org/static/htdocs/spring-boot/docs/${project.artifactId}/${project.version}</url>
49+
</site>
50+
<repository>
51+
<id>sonatype-nexus-staging</id>
52+
<name>Nexus Release Repository</name>
53+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
54+
</repository>
55+
<snapshotRepository>
56+
<id>repo.spring.io</id>
57+
<name>Spring Snapshot Repository</name>
58+
<url>https://repo.spring.io/libs-snapshot-local</url>
59+
</snapshotRepository>
60+
</distributionManagement>
61+
<profiles>
62+
<profile>
63+
<id>milestone</id>
64+
<distributionManagement>
65+
<repository>
66+
<id>repo.spring.io</id>
67+
<name>Spring Milestone Repository</name>
68+
<url>https://repo.spring.io/libs-milestone-local</url>
69+
</repository>
70+
</distributionManagement>
71+
</profile>
72+
<profile>
73+
<id>central</id>
74+
<build>
75+
<plugins>
76+
<plugin>
77+
<groupId>org.apache.maven.plugins</groupId>
78+
<artifactId>maven-gpg-plugin</artifactId>
79+
<executions>
80+
<execution>
81+
<id>sign-artifacts</id>
82+
<phase>verify</phase>
83+
<goals>
84+
<goal>sign</goal>
85+
</goals>
86+
</execution>
87+
</executions>
88+
</plugin>
89+
</plugins>
90+
</build>
91+
</profile>
92+
</profiles>
93+
4494
</project>

timing/src/main/java/org/springframework/boot/aspects/AspectConfiguration.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class AspectConfiguration {
3636
@Bean
3737
@Conditional(AspectsCondition.class)
3838
@ConditionalOnClass(name = "org.aspectj.lang.Aspects")
39-
public TimingInterceptor interceptor() {
39+
public TimingInterceptor timingInterceptor() {
4040
return Aspects.aspectOf(TimingInterceptor.class);
4141
}
4242

timing/src/main/java/org/springframework/boot/aspects/TimingInterceptor.java

+36
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ public class TimingInterceptor {
3838

3939
private StopWatch init = new StopWatch("init");
4040

41+
private StopWatch app = new StopWatch("app");
42+
43+
private int level = 0;
44+
4145
@Around("execution(private * org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(Object, String, ..)) && args(bean,..)")
4246
public Object bind(ProceedingJoinPoint joinPoint, Object bean) throws Throwable {
4347
bind.start();
@@ -59,6 +63,38 @@ public Object post(ProceedingJoinPoint joinPoint, Object bean) throws Throwable
5963
return result;
6064
}
6165

66+
@Around("execution(* org.springframework.boot.SpringApplication+.*(..))")
67+
public Object initializer(ProceedingJoinPoint joinPoint) throws Throwable {
68+
String task = app.currentTaskName();
69+
if (task != null) {
70+
app.stop();
71+
}
72+
long t0 = System.currentTimeMillis();
73+
level++;
74+
app.start(joinPoint.getSignature().getName());
75+
Object result = joinPoint.proceed();
76+
long t1 = System.currentTimeMillis();
77+
app.stop();
78+
if (task != null) {
79+
app.start(task);
80+
}
81+
logger.info("App," + level + "," + joinPoint.getSignature().getName() + ","
82+
+ (t1 - t0));
83+
level--;
84+
return result;
85+
}
86+
87+
@Around("execution(* org.springframework.web.reactive.DispatcherHandler+.initStrategies(..))")
88+
public Object initStrategies(ProceedingJoinPoint joinPoint) throws Throwable {
89+
long t0 = System.currentTimeMillis();
90+
Object result = joinPoint.proceed();
91+
long t1 = System.currentTimeMillis();
92+
logger.info("Strategies,"
93+
+ joinPoint.getSignature().getDeclaringType().getSimpleName() + "."
94+
+ joinPoint.getSignature().getName() + "," + (t1 - t0));
95+
return result;
96+
}
97+
6298
@Around("execution(* org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory+.initializeBean(String, Object, ..)) && args(name,bean,..)")
6399
public Object init(ProceedingJoinPoint joinPoint, String name, Object bean)
64100
throws Throwable {

0 commit comments

Comments
 (0)