Skip to content

Commit 0ec75e9

Browse files
committed
perf(context): Remove the metrics code in the default construction method of AnnotationConfigApplicationContext
AbstractApplicationContext.applicationStartup can only be injected after the instance construction. This metrics point has no practical effect at present. I think it can be removed.
1 parent d81f1a5 commit 0ec75e9

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

spring-context/src/main/java/org/springframework/context/annotation/AnnotationConfigApplicationContext.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,7 @@ public class AnnotationConfigApplicationContext extends GenericApplicationContex
6666
* through {@link #register} calls and then manually {@linkplain #refresh refreshed}.
6767
*/
6868
public AnnotationConfigApplicationContext() {
69-
StartupStep createAnnotatedBeanDefReader = getApplicationStartup().start("spring.context.annotated-bean-reader.create");
7069
this.reader = new AnnotatedBeanDefinitionReader(this);
71-
createAnnotatedBeanDefReader.end();
7270
this.scanner = new ClassPathBeanDefinitionScanner(this);
7371
}
7472

0 commit comments

Comments
 (0)