This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<parent> | |
<groupId>org.springframework.boot</groupId> | |
<artifactId>spring-boot-starter-parent</artifactId> | |
<version>1.4.1.RELEASE</version> | |
</parent> | |
<groupId>com.invivoo</groupId> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.invivoo.springcloud.util; | |
import java.io.IOException; | |
import java.nio.file.Files; | |
import java.nio.file.Paths; | |
import java.util.List; | |
import java.util.stream.Collectors; | |
import java.util.stream.Stream; | |
public class ReadFile { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--kubik.ean13=1 | |
--kubik.environment=development | |
--kubik.company.name=Open | |
--spring.datasource.url=jdbc:mysql://localhost:3306/kubik-test?useUnicode=yes&characterEncoding=UTF-8 | |
--spring.datasource.password=test | |
--spring.datasource.username=test | |
--elasticsearch.hostname=localhost | |
--elasticsearch.port=9300 | |
--kos.notification.enabled=false | |
--kubik.dilicom.enabled=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
mysql: | |
image: tutum/mysql | |
environment: | |
- MYSQL_PASS=test | |
- MYSQL_USER=test | |
- ON_CREATE_DB=test | |
ports: | |
- 3306 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Product { | |
private String ean13; | |
private String name; | |
private double unitPrice; | |
private double taxRate; | |
public Product(){ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<h1>Je suis un produit de test !</h1> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spring.datasource.url=jdbc:mysql://localhost:3306/test?useUnicode=yes&characterEncoding=UTF-8 | |
spring.datasource.driver-class-name=com.mysql.jdbc.Driver | |
spring.datasource.password=test | |
spring.datasource.testOnBorrow=true | |
spring.datasource.username=test | |
spring.datasource.validation-query=SELECT 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void importProduct() { | |
try { | |
for (String line : ReadFileUtil.readFile(new ClassPathResource("data.csv").getFile().getAbsolutePath())) { | |
String[] elements = line.split(","); | |
Product product = new Product(); | |
product.setEan13(elements[0]); | |
product.setName(elements[1]); | |
product.setUnitPrice(Double.valueOf(elements[2])); | |
product.setTaxRate(Double.valueOf(elements[3])); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spring.cloud.config.server.git.uri= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"name":"CONFIGSERVER","instances":[{"id":"CONFIGSERVER_localhost:configserver:8888","url":"http://localhost:8888","name":"localhost:configserver:8888","status":"UP"}]},{"name":"EUREKA-SERVER","instances":[{"id":"EUREKA-SERVER_localhost:eureka-server:8761","url":"http://localhost:8761","name":"localhost:eureka-server:8761","status":"UP"}]},{"name":"PRODUCT-SERVER","instances":[{"id":"PRODUCT-SERVER_product-server-1","url":"http://localhost:53907","name":"product-server-1","status":"UP"}]},{"name":"ZUUL-SERVER","instances":[{"id":"ZUUL-SERVER_localhost:zuul-server:8080","url":"http://localhost:8080","name":"localhost:zuul-server:8080","status":"UP"}]}] |
OlderNewer