BAEL-4785 | Refactor | remove unused code

This commit is contained in:
vishal 2021-04-11 18:40:15 +02:00
parent e183a0a9e5
commit bb1dcf7ce3
3 changed files with 0 additions and 19 deletions

View File

@ -1,7 +0,0 @@
package com.baeldung.springbean.naming.gateway;
import org.springframework.stereotype.Service;
@Service
public class LoggingGateway {
}

View File

@ -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;
}

View File

@ -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