Commit 8baa97d5 authored by mohammad.salama's avatar mohammad.salama

Added Ureka Server (Just Boot)

parent 36254668
...@@ -7,14 +7,20 @@ ...@@ -7,14 +7,20 @@
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" /> <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" /> <outputRelativeToContentRoot value="true" />
<module name="WeatherService" /> <module name="WeatherService" />
<module name="DiscAndReg" />
<module name="UserService" /> <module name="UserService" />
<module name="DataBase" /> <module name="DataBase" />
</profile> </profile>
</annotationProcessing> </annotationProcessing>
<bytecodeTargetLevel>
<module name="MicroServices (1)" target="17" />
<module name="ServiceDiscoveryAndRegistry" target="17" />
</bytecodeTargetLevel>
</component> </component>
<component name="JavacSettings"> <component name="JavacSettings">
<option name="ADDITIONAL_OPTIONS_OVERRIDE"> <option name="ADDITIONAL_OPTIONS_OVERRIDE">
<module name="DataBase" options="" /> <module name="DataBase" options="" />
<module name="DiscAndReg" options="-parameters" />
</option> </option>
</component> </component>
</project> </project>
\ No newline at end of file
...@@ -3,6 +3,10 @@ ...@@ -3,6 +3,10 @@
<component name="Encoding"> <component name="Encoding">
<file url="file://$PROJECT_DIR$/DataBase/src/main/java" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/DataBase/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/DataBase/src/main/resources" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/DataBase/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/DiscAndReg/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/DiscAndReg/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ServiceDiscoveryAndRegistry/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ServiceDiscoveryAndRegistry/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/UserService/src/main/java" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/UserService/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/UserService/src/main/resources" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/UserService/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/WeatherService/src/main/java" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/WeatherService/src/main/java" charset="UTF-8" />
......
...@@ -16,5 +16,10 @@ ...@@ -16,5 +16,10 @@
<option name="name" value="JBoss Community repository" /> <option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" /> <option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository> </remote-repository>
<remote-repository>
<option name="id" value="netflix-candidates" />
<option name="name" value="Netflix Candidates" />
<option name="url" value="https://artifactory-oss.prod.netflix.net/artifactory/maven-oss-candidates" />
</remote-repository>
</component> </component>
</project> </project>
\ No newline at end of file
...@@ -7,6 +7,11 @@ ...@@ -7,6 +7,11 @@
<option value="$PROJECT_DIR$/pom.xml" /> <option value="$PROJECT_DIR$/pom.xml" />
</list> </list>
</option> </option>
<option name="ignoredFiles">
<set>
<option value="$PROJECT_DIR$/ServiceDiscoveryAndRegistry/pom.xml" />
</set>
</option>
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="17 (2)" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="17 (2)" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" /> <output url="file://$PROJECT_DIR$/out" />
......
...@@ -8,13 +8,6 @@ ...@@ -8,13 +8,6 @@
<version>1.0-SNAPSHOT</version> <version>1.0-SNAPSHOT</version>
</parent> </parent>
<!--<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.0.1</version>
<relativePath/>
</parent-->
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>DataBase</artifactId> <artifactId>DataBase</artifactId>
......
<?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">
<!-- <parent>-->
<!-- <artifactId>MicroServices</artifactId>-->
<!-- <groupId>org.example</groupId>-->
<!-- <version>1.0-SNAPSHOT</version>-->
<!-- </parent>-->
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.0.1</version>
<relativePath/>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>DiscAndReg</artifactId>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<java.version>17</java.version>
<spring-cloud.version>2022.0.0</spring-cloud.version>
</properties>
<dependencies>
<!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-autoconfigure</artifactId>-->
<!-- <version>3.0.1</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.springframework</groupId>-->
<!-- <artifactId>spring-web</artifactId>-->
<!-- <version>6.1.1</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.example</groupId>-->
<!-- <artifactId>DataBase</artifactId>-->
<!-- <version>1.0-SNAPSHOT</version>-->
<!-- <scope>compile</scope>-->
<!-- </dependency>-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.example</groupId>-->
<!-- <artifactId>WeatherService</artifactId>-->
<!-- <version>1.0-SNAPSHOT</version>-->
<!-- <scope>compile</scope>-->
<!-- </dependency>-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.9</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.4.11</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.4.11</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.9</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>netflix-candidates</id>
<name>Netflix Candidates</name>
<url>https://artifactory-oss.prod.netflix.net/artifactory/maven-oss-candidates</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
</project>
\ No newline at end of file
package org.DiscoveryAndRegistry;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
@SpringBootApplication
@EnableEurekaServer
public class ServiceDiscoveryApplication {
public static void main(String[] args) {
SpringApplication.run(ServiceDiscoveryApplication.class, args);
}
}
server.port = 8761
eureka.client.registerWithEureka=false
eureka.client.fetchRegistry=false
\ No newline at end of file
server.port = 8761
eureka.client.registerWithEureka=false
eureka.client.fetchRegistry=false
\ No newline at end of file
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
<module>UserService</module> <module>UserService</module>
<module>WeatherService</module> <module>WeatherService</module>
<module>DataBase</module> <module>DataBase</module>
<module>DiscAndReg</module>
</modules> </modules>
<properties> <properties>
......
myAPIKey = "57afea8fc6e142f29f2115632242604"; myAPIKey = "57afea8fc6e142f29f2115632242604";
prefURL = "http://api.weatherapi.com/v1/current.json?key="+myAPIKey + "&q="; //city prefURL = "http://api.weatherapi.com/v1/current.json?key="+myAPIKey + "&q=";
sufURL = "&days=1&aqi=no&alerts=no"; sufURL = "&days=1&aqi=no&alerts=no";
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment