Junior — Middle
Explain the working principle of a bound service in Android and how it differs from other types of services.
sobes.tech AI
Answer from AI
The default scope for a Bean in Spring Framework is singleton. This means that only one instance of the bean is created within the Spring container, and all requests for that bean return the same object.
Example:
@Component
public class MyService {
// This bean will be a singleton by default
}
If you want to change the scope, you can use the @Scope annotation.