This file contains hidden or 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
| version: "3.8" | |
| services: | |
| postgres: | |
| image: postgres:latest | |
| container_name: postgres | |
| environment: | |
| - POSTGRES_USER=admin | |
| - POSTGRES_PASSWORD=12345 | |
| - POSTGRES_DB=book-db | |
| volumes: |
This file contains hidden or 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
| docker run -d \ | |
| --name book-app \ | |
| -p 8083:8083 \ | |
| --network pgnetwork \ | |
| book-app:latest |
This file contains hidden or 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
| FROM openjdk:8-jdk-alpine | |
| MAINTAINER juan.aranda.galvis@gmail.com | |
| RUN addgroup -S spring && adduser -S spring -G spring | |
| USER spring:spring | |
| ADD ./target/book-app-0.0.1-SNAPSHOT.jar /home/book-app/book-app.jar | |
| WORKDIR home/book-app | |
| ENTRYPOINT ["java","-jar","book-app.jar"] |
This file contains hidden or 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
| docker run -d \ | |
| --name pgadmin \ | |
| -e PGADMIN_DEFAULT_EMAIL=juan.aranda.galvis@gmail.com \ | |
| -e PGADMIN_DEFAULT_PASSWORD=12345 \ | |
| -e PGADMIN_LISTEN_PORT=92 \ | |
| -p 9292:92 \ | |
| --network pgnetwork \ | |
| dpage/pgadmin4:latest |
This file contains hidden or 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
| docker run -d \ | |
| --name postgres \ | |
| -e POSTGRES_PASSWORD=12345 \ | |
| -e POSTGRES_USER=admin \ | |
| -p 5432:5432 \ | |
| --network pgnetwork \ | |
| postgres:latest |
This file contains hidden or 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
| import static org.junit.jupiter.api.Assertions.assertEquals; | |
| import static org.junit.jupiter.api.Assertions.assertTrue; | |
| class EmailValidatorTest { | |
| private static final String VALID_EMAIL = "juan.aranda.galvis@gmail.com"; | |
| private static final String INVALID_EMAIL = "juan.aranda.galvis@gmail"; | |
| private EmailValidator emailValidator; |
This file contains hidden or 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
| import com.globant.demos.core.config.KafkaConfig; | |
| import com.globant.demos.core.consumer.AemKafkaConsumerJob; | |
| import lombok.extern.slf4j.Slf4j; | |
| import org.osgi.service.component.annotations.Activate; | |
| import org.osgi.service.component.annotations.Component; | |
| import org.osgi.service.component.annotations.Reference; | |
| import java.net.InetAddress; | |
| import java.net.UnknownHostException; | |
| import java.util.concurrent.CountDownLatch; |
This file contains hidden or 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
| import com.globant.demos.core.config.KafkaConfig; | |
| import lombok.extern.slf4j.Slf4j; | |
| import org.apache.kafka.clients.consumer.ConsumerConfig; | |
| import org.apache.kafka.clients.consumer.ConsumerRecord; | |
| import org.apache.kafka.clients.consumer.ConsumerRecords; | |
| import org.apache.kafka.clients.consumer.KafkaConsumer; | |
| import org.apache.kafka.common.errors.WakeupException; | |
| import org.apache.kafka.common.serialization.StringDeserializer; | |
| import java.time.Duration; |
This file contains hidden or 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 test { | |
| } |
This file contains hidden or 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
| import org.osgi.service.component.annotations.Activate; | |
| import org.osgi.service.component.annotations.Component; | |
| import org.osgi.service.component.annotations.Modified; | |
| import org.osgi.service.component.propertytypes.ServiceDescription; | |
| import org.osgi.service.metatype.annotations.Designate; | |
| @Component(service = KafkaConfig.class, immediate = true) | |
| @ServiceDescription("Kafka Configuration") | |
| @Designate(ocd = KafkaConfigProperties.class) | |
| public class KafkaConfig { |
NewerOlder