Skip to content

Instantly share code, notes, and snippets.

View migueldoctor's full-sized avatar

migueldoctor migueldoctor

  • Kesizo Space
  • World
View GitHub Profile
package com.kesizo.microservices.config;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.config.server.EnableConfigServer;
@SpringBootApplication
@EnableConfigServer
public class ApplicationConfigServer {
@migueldoctor
migueldoctor / pom.xml
Created April 2, 2019 13:39
Pom file for Spring Cloud Configuration Server project
<?xml version="1.0" encoding="UTF-8"?>
<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>
<groupId>com.kesizo.miroservices.config</groupId>
<artifactId>SpringCloudConfigurationServer</artifactId>
<version>1.0-SNAPSHOT</version>
@migueldoctor
migueldoctor / application.yml
Created April 2, 2019 13:52
Configuration file for spring cloud config server
# HTTP Server
server:
port: 8888
spring:
# Spring Cloud Config Server Repository
cloud:
config:
server:
git:
@migueldoctor
migueldoctor / pom.xml
Created April 9, 2019 08:44
EurekaDiscoveryServer pom file
<?xml version="1.0" encoding="UTF-8"?>
<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>
<groupId>com.kesizo.microservices.discovery</groupId>
<artifactId>EurekaDiscoveryServer</artifactId>
<version>1.0-SNAPSHOT</version>
@migueldoctor
migueldoctor / ApplicationEurekaServer.java
Last active April 9, 2019 09:45
Entry point of our Eureka Server
package com.kesizo.microservices.discovery;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
@EnableEurekaServer
@SpringBootApplication
public class ApplicationEurekaServer {
@migueldoctor
migueldoctor / application.yml
Last active May 8, 2019 15:47
Configuration file for Eureka Server sample
#Application Name
spring:
application:
name: eureka-server
server:
port: 8761
eureka:
client:
#Application Name
spring:
application:
name: eureka-server # This is the name for the remote configuration file
cloud:
config:
uri: http://localhost:8888 #where the config-service is running
fail-fast: true #the service will not run if it can't reach the config-service
@migueldoctor
migueldoctor / pom.xml
Last active May 10, 2019 13:07
Pom file for ZuulGatewayServer project
<?xml version="1.0" encoding="UTF-8"?>
<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>
<groupId>com.kesizo.microservices.gateway</groupId>
<artifactId>ZuulGatewayServer</artifactId>
<version>1.0-SNAPSHOT</version>
@migueldoctor
migueldoctor / ZuulGatewayServer.java
Created May 10, 2019 13:29
Main class of our ZuulGatewayServer
package com.kesizo.microservices.gateway;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
@SpringBootApplication
@EnableDiscoveryClient
@EnableZuulProxy
@migueldoctor
migueldoctor / bootstrap.yml
Created May 10, 2019 13:41
bootstrap.yml file for ZuulGatewayServer
#Application Name
spring:
application:
name: zuul-server # This is the name for the remote configuration file
cloud:
config:
uri: http://localhost:8888 #where the config-service is running
fail-fast: true #the service will not run if it can't reach the config-service