Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,5 @@ Para visualizar os logs da aplicação a partir do container: `docker logs -f mo
* Separar testes unitários dos testes integrados
* Corrigir os testes ignorados
* Corrigir Code Style
* Adicionar plugin do FindBugs
* Revisar dependências (ver, por exemplo, se é mesmo necessário ter o GSON ou modelmapper)
* Usar objectmapper como component: `compile('com.fasterxml.jackson.datatype:jackson-datatype-jdk8')`
10 changes: 9 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'jacoco'
apply plugin: 'docker'
apply plugin: 'findbugs'

findbugs {
sourceSets = [sourceSets.main]
ignoreFailures = true
effort = "default"
reportLevel = "high"
}

version = '4.0.0-SNAPSHOT'
sourceCompatibility = 1.8
Expand All @@ -37,7 +45,6 @@ dependencies {
compile 'commons-io:commons-io:2.5'
compile 'org.apache.httpcomponents:httpclient:4.4.1'
compile 'com.squareup.okhttp3:okhttp:3.8.1'

testCompile 'org.springframework.boot:spring-boot-starter-test'
testCompile 'br.com.six2six:fixture-factory:3.1.0'
}
Expand Down Expand Up @@ -71,3 +78,4 @@ task buildDocker(type: Docker, dependsOn: build) {
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
import br.com.concrete.mock.infra.property.FileExtensionProperty;
import br.com.concrete.mock.infra.property.FileProperty;
import com.google.gson.Gson;
import java.nio.charset.Charset;
import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down Expand Up @@ -70,8 +72,7 @@ private Boolean execute(final Endpoint endpoint) {

try {
Files.createDirectories(Paths.get(pathName));
Files.write(Paths.get(fileName), endpointJson.getBytes());

Files.write(Paths.get(fileName), Arrays.asList(endpointJson), Charset.defaultCharset());
LOGGER.info("Backup into " + fileName);
} catch (IOException e) {
LOGGER.error("Cannot backup endpoint {}", e);
Expand Down