@ServiceInterface
public interface AuthenticationService {
boolean authenticate(String username, String password);
}
@Component
public class BasicAuthenticationService implements AuthenticationService {
@Override
public boolean authenticate(String username, String password) {
}
}
@Component
public class AuthController {
@Reference
private AuthenticationService authenticationService;
public void handleLoginRequest(String username, String password) {
boolean isValid = authenticationService.authenticate(username, password);
}
}