Commit db9a8642 authored by Ali Saeed's avatar Ali Saeed

testing from postman

parent 9dbbef7d
......@@ -14,7 +14,7 @@
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring-cloud.version>2022.0.4</spring-cloud.version>
<spring-cloud.version>2022.0.0</spring-cloud.version>
</properties>
<dependencies>
<dependency>
......
......@@ -21,6 +21,7 @@ public class ExternalAPI {
" \"prompt\": \"generate just one random json object contains these attributes: value, status, description, userID, invoiceID. where status is false and value is double and invoiceId is " + invoiceId + ", please just return this object without any words else\"\n" +
"}";
String response = sendRequestToAPI(prompt);
System.out.println(response.toString());
String jsonString = "";
int firstIndex = response.toString().indexOf("{");
int endIndex = response.toString().indexOf("}");
......@@ -41,6 +42,7 @@ public class ExternalAPI {
} catch (IOException e) {
throw new RuntimeException(e);
}
String jsonString = "";
int firstIndex = response.toString().indexOf("[");
int endIndex = response.toString().indexOf("]");
......@@ -113,6 +115,7 @@ public class ExternalAPI {
System.out.println(e.getMessage());
}
connection.disconnect();
System.out.println(response.toString());
return response.toString();
}
......
spring.application.name=invoicing-service
server.port=8081
eureka.client.serviceUrl.defaultZone= ${EUREKA_URL:http://localhost:8761/eureka/}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -8,14 +8,13 @@
<version>3.0.1</version>
<relativePath/>
</parent>
<artifactId>service-discovery</artifactId>
<name>service-discovery</name>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring-cloud.version>2020.0.4</spring-cloud.version>
<spring-cloud.version>2022.0.0</spring-cloud.version>
</properties>
<dependencies>
......@@ -27,7 +26,6 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>2.5.5</version>
<scope>test</scope>
</dependency>
<dependency>
......@@ -58,7 +56,6 @@
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
......
......@@ -18,7 +18,7 @@
<appender-ref ref="CONSOLE"/> <!-- Add the console appender reference -->
</logger>
<root level="error">
<root level="DEBUG">
<appender-ref ref="FILE"/>
<appender-ref ref="CONSOLE"/> <!-- Add the console appender reference -->
</root>
......
......@@ -18,7 +18,7 @@
<appender-ref ref="CONSOLE"/> <!-- Add the console appender reference -->
</logger>
<root level="error">
<root level="DEBUG">
<appender-ref ref="FILE"/>
<appender-ref ref="CONSOLE"/> <!-- Add the console appender reference -->
</root>
......
......@@ -16,7 +16,7 @@
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring-cloud.version>2022.0.4</spring-cloud.version>
<spring-cloud.version>2022.0.0</spring-cloud.version>
</properties>
<dependencies>
......
spring.application.name=users-service
server.port=8080
eureka.client.serviceUrl.defaultZone= ${EUREKA_URL:http://localhost:8761/eureka/}
\ No newline at end of file
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