Module to integrate Moip SDK on spring boot apps
This project uses Project Lombok to generate getters and setters etc. Compiling from the command line this shouldn't cause any problems, but in an IDE you need to add an agent to the JVM. Full instructions can be found in the Lombok website. The sign that you need to do this is a lot of compiler errors to do with missing methods and fields.
This project is available on maven central
Add the dependency on pom.xml
<dependency>
<groupId>com.marcosbarbero.boot</groupId>
<artifactId>spring-boot-moip-integration</artifactId>
<version>1.0.0.RELEASE</version>
</dependency>
Sample configuration for Basic Authentication
moip:
health-indicator-enabled: true # Default false
security:
basic:
token: # Basic auth token
key: # Basic auth key
environment: production #default value sandbox
Sample configuration for OAuth Authentication
moip:
health-indicator-enabled: true # Default false
security:
oauth:
access-token: # AccessToken provided by moip
environment: production #default value sandbox
Note 1: All the security keys are provided by Moip.
Note 2: The available values formoip.environment
property areproduction
orsandbox
having the last as default value.
In order to enabled heal check for Moip services will be needed to turn this flag on:
moip.health-indicator-enabled: true #default false
Also there's a need to add the actuator dependency on the project:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
@Autowired
private br.com.moip.API api;
Spring Boot Moip Integration is released under the non-restrictive Apache 2.0 license, and follows a very standard Github development process, using Github tracker for issues and merging pull requests into master. If you want to contribute even something trivial please do not hesitate, but follow the guidelines below.
This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to marcos.hgb@gmail.com.
Any doubt open an issue. Any fix send me a Pull Request.