BAEL-4785 | Refactor | remove unused code
This commit is contained in:
		
							parent
							
								
									e183a0a9e5
								
							
						
					
					
						commit
						bb1dcf7ce3
					
				| @ -1,7 +0,0 @@ | ||||
| package com.baeldung.springbean.naming.gateway; | ||||
| 
 | ||||
| import org.springframework.stereotype.Service; | ||||
| 
 | ||||
| @Service | ||||
| public class LoggingGateway { | ||||
| } | ||||
| @ -1,12 +1,7 @@ | ||||
| package com.baeldung.springbean.naming.service; | ||||
| 
 | ||||
| import com.baeldung.springbean.naming.gateway.LoggingGateway; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.stereotype.Service; | ||||
| 
 | ||||
| @Service | ||||
| public class LoggingService { | ||||
| 
 | ||||
|     @Autowired | ||||
|     private LoggingGateway gateway; | ||||
| } | ||||
|  | ||||
| @ -38,13 +38,6 @@ public class SpringBeanNamingUnitTest { | ||||
|         assertNotNull(context.getBean("audit")); | ||||
|     } | ||||
| 
 | ||||
|     // To name a bean spring gets the class name and converts the first letter to lowercase. | ||||
|     // Default naming strategy of the spring bean which is using class level annotation | ||||
|     @Test | ||||
|     void givenLoggingGatewayBeanIsCreatedWithFieldLevelAnnotation_whenThereIsNoValueProvided_thenBeanNameShouldBeDefaultName() { | ||||
|         assertNotNull(context.getBean("loggingGateway")); | ||||
|     } | ||||
| 
 | ||||
|     // spring will create the bean of type CustomComponent with the name "myBean". | ||||
|     // As we're explicitly giving the name to the bean, spring will use this name to refer to it. | ||||
|     @Test | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user