Spring Boot Starter
es.neivi:iqx-lookup-spring-boot-starter — auto-configures an IqxLookup bean for Spring Boot 3.x applications.
Installation
Maven:
<dependency>
<groupId>es.neivi</groupId>
<artifactId>iqx-lookup-spring-boot-starter</artifactId>
<version>0.2.1</version>
</dependency>
Gradle:
implementation 'es.neivi:iqx-lookup-spring-boot-starter:0.2.1'
Configuration
application.yml:
iqx-lookup:
api-key: ALk-your-api-key
base-url: https://api.iqxlookup.neivi.es # optional
timeout: 10 # seconds, optional
application.properties:
iqx-lookup.api-key=ALk-your-api-key
iqx-lookup.base-url=https://api.iqxlookup.neivi.es
iqx-lookup.timeout=10
Usage
The starter auto-registers an IqxLookup bean when iqx-lookup.api-key is set. Inject it anywhere:
import es.neivi.iqx.lookup.IqxLookup;
import org.springframework.stereotype.Service;
@Service
public class ValidationService {
private final IqxLookup lookup;
public ValidationService(IqxLookup lookup) {
this.lookup = lookup;
}
public boolean isEmailValid(String email) {
return lookup.validateEmail(email).isValidFormat();
}
}
Custom Bean Override
The auto-configuration uses @ConditionalOnMissingBean, so you can provide your own IqxLookup bean:
@Configuration
public class CustomLookupConfig {
@Bean
public IqxLookup iqxLookup() {
return IqxLookup.builder()
.apiKey("custom-key")
.timeout(Duration.ofSeconds(30))
.buildClient();
}
}
Properties Reference
| Property | Type | Default | Description |
|---|---|---|---|
iqx-lookup.api-key | String | — | API key (required, activates auto-config) |
iqx-lookup.base-url | String | https://api.iqxlookup.neivi.es | Base URL |
iqx-lookup.timeout | int | 10 | Request timeout in seconds |
See the Java SDK page for full API reference and error handling.