ENV Spring=6.2.11 Java=21.0.11
CHECK PASS 00 manual/container both return 25.00
CHECK PASS 00 both repositories saved once
CHECK PASS 00 reject zero quantity -> IllegalArgumentException
CHECK PASS 00 reject negative quantity -> IllegalArgumentException
CHECK PASS 00 reject zero unit price -> IllegalArgumentException
CHECK PASS 00 reject negative unit price -> IllegalArgumentException
CHECK PASS 00 reject invalid persisted amount -> IllegalArgumentException
CHECK PASS 00 invalid amount does not save
CHECK PASS 00 context close destroys managed repository
CHECK PASS 00 manual repository requires explicit destroy
10月 02, 2026 3:33:51 下午 org.springframework.context.support.AbstractApplicationContext refresh
警告: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'orderService': Unsatisfied dependency expressed through constructor parameter 0: No qualifying bean of type 'blog.spring.OrderRepository' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
CHECK PASS 00 missing repository fails refresh -> UnsatisfiedDependencyException
CHAPTER 00 PASS
ENV Spring=6.2.11 Java=21.0.11
CHECK PASS 01 definition registered before instance creation
CHECK PASS 01 singleton lookup identity
CHECK PASS 01 new object is outside container
CHECK PASS 01 prototype lookup creates distinct objects
CHECK PASS 01 one singleton + manual + two prototype instances
CHECK PASS 01 same name in separate containers has separate singleton identity
CHECK PASS 01 two definitions of same class have distinct singleton instances
CHAPTER 01 PASS
ENV Spring=6.2.11 Java=21.0.11
CHECK PASS 02 definition registration does not instantiate
CHECK PASS 02 definition records two constructor references
CHECK PASS 02 programmatic alias identity
CHECK PASS 02 programmatic same order result
CHECK PASS 02 alias preserves prototype scope
CHECK PASS 02 programmatic definition resource may be null
CHECK PASS 02 XML loading registers definitions only
CHECK PASS 02 XML definition records resource description
CHECK PASS 02 XML alias identity
CHECK PASS 02 XML same order result
CHECK PASS 02 configuration alias identity
CHECK PASS 02 configuration same order result
CHECK PASS 02 Bean definition records factory method
CHECK PASS 02 three containers create three services
CHAPTER 02 PASS
ENV Spring=6.2.11 Java=21.0.11
CHECK PASS 03 refresh phase order [registry, factory, construct, before, init, after, refreshed]
CHECK PASS 03 BPP wrapper preserves callable behavior
CHECK PASS 03 close destroys original target behind wrapper
10月 02, 2026 3:33:56 下午 org.springframework.context.support.AbstractApplicationContext refresh
警告: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'broken': Failed to instantiate [blog.spring.Chapter03$Broken]: Constructor threw exception
CHECK PASS 03 singleton creation failure cancels refresh -> BeanCreationException
CHECK PASS 03 failed refresh destroys already created disposable singleton [construct, init, destroy]
CHECK PASS 03 failed context inactive
10月 02, 2026 3:33:56 下午 org.springframework.context.support.AbstractApplicationContext refresh
警告: Exception encountered during context initialization - cancelling refresh attempt: java.lang.IllegalStateException: intentional factory post-processor failure
CHECK PASS 03 factory failure propagates -> IllegalStateException
CHECK PASS 03 factory cleanup boundary events=[construct, init, destroy]
CHECK PASS 03 factory active=false
CHECK PASS 03 factory singleton retention=false
CHECK PASS 03 factory explicit close leaves disposable destroyed
10月 02, 2026 3:33:56 下午 org.springframework.context.support.AbstractApplicationContext refresh
警告: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'brokenProcessor': Instantiation of supplied bean failed
CHECK PASS 03 BPP failure propagates -> BeanCreationException
CHECK PASS 03 BPP cleanup boundary events=[construct, init, destroy]
CHECK PASS 03 BPP active=false
CHECK PASS 03 BPP singleton retention=false
CHECK PASS 03 BPP explicit close leaves disposable destroyed
CHECK PASS 03 prepareRefresh failure propagates -> IllegalStateException
CHECK PASS 03 prepareRefresh cleanup boundary events=[construct, init]
CHECK PASS 03 prepareRefresh active=true
CHECK PASS 03 prepareRefresh singleton retention=true
CHECK PASS 03 prepareRefresh explicit close leaves disposable destroyed
CHAPTER 03 PASS
ENV Spring=6.2.11 Java=21.0.11
CHECK PASS 04 component scan registers component
CHECK PASS 04 Import registers explicit type
CHECK PASS 04 full configuration intercepts direct Bean call
CHECK PASS 04 lite direct Bean call creates unmanaged repository
CHECK PASS 04 lite method parameter restores managed injection
CHECK PASS 04 context cannot destroy repository made by ordinary direct call
CHAPTER 04 PASS
ENV Spring=6.2.11 Java=21.0.11
10月 02, 2026 3:34:00 下午 org.springframework.context.support.AbstractApplicationContext refresh
警告: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'chapter05.NeedsChannel': Unsatisfied dependency expressed through constructor parameter 0: No qualifying bean of type 'blog.spring.Chapter05$Channel' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
CHECK PASS 05 zero candidates fails constructor injection -> UnsatisfiedDependencyException
CHECK PASS 05 zero failure root is missing candidate
CHECK PASS 05 one candidate injected
10月 02, 2026 3:34:00 下午 org.springframework.context.support.AbstractApplicationContext refresh
警告: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'chapter05.NeedsChannel': Unsatisfied dependency expressed through constructor parameter 0: No qualifying bean of type 'blog.spring.Chapter05$Channel' available: expected single matching bean but found 2: chapter05.Web,chapter05.Store
CHECK PASS 05 multiple candidates fail without selection -> UnsatisfiedDependencyException
CHECK PASS 05 multiple failure root is ambiguity
CHECK PASS 05 Primary resolves single injection
CHECK PASS 05 Qualifier narrows candidate
CHECK PASS 05 collection contains both even with Primary
CHECK PASS 05 generic String candidate selected
CHECK PASS 05 ObjectProvider injection leaves lazy target uncreated
CHECK PASS 05 provider resolves one lazy singleton on demand
CHAPTER 05 PASS
ENV Spring=6.2.11 Java=21.0.11
CHECK PASS 06 constructor/static/instance factory eagerly create three products
CHECK PASS 06 three creation mechanisms return products
CHECK PASS 06 ordinary FactoryBean itself eager but product not yet created
CHECK PASS 06 FactoryBean singleton product cached
CHECK PASS 06 ampersand retrieves factory identity
CHECK PASS 06 non-singleton FactoryBean creates each product
CHECK PASS 06 provider acquisition does not instantiate target
CHECK PASS 06 lazy singleton initialized once on lookup
CHECK PASS 06 provider honors prototype scope per lookup
CHECK PASS 06 raw FactoryBean type query without init stays unknown and uncreated
CHECK PASS 06 allowed type query constructs raw factory but not product
CHECK PASS 06 raw factory product created only on product lookup
CHECK PASS 06 eager constructor dependency forces lazy singleton creation during refresh
CHAPTER 06 PASS
ALL 7 CHAPTERS PASS
