-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
⭐Nuevas funcionalidades y 🐞Solución de errores
⭐Nuevas funcionalidades - Se incorporo una interfaz sencilla para poder acceder a la documentación, se utiliza "thymeleaf" 🐞Solución de errores -Cambios para solucionar error de CORS
- Loading branch information
1 parent
fd954ed
commit e6cf870
Showing
6 changed files
with
100 additions
and
15 deletions.
There are no files selected for viewing
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
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
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
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
24 changes: 24 additions & 0 deletions
24
src/main/java/com/app/ExchangeRates/controller/HomeController.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.app.ExchangeRates.controller; | ||
|
||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.stereotype.Controller; | ||
import org.springframework.ui.Model; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
|
||
@Controller | ||
public class HomeController { | ||
@Value("${openapi.service.url}") | ||
private String openApiUrl; | ||
@Value("${spring-doc.api-docs.path}") | ||
private String apiDocsUrl; | ||
@Value("${spring-doc.swagger-ui.path}") | ||
private String swaggerUiUrl; | ||
@GetMapping("/") | ||
public String home(Model model){ | ||
model.addAttribute("urlSwaggerDoc", | ||
openApiUrl.concat(swaggerUiUrl)); | ||
model.addAttribute("urlJsonDoc", | ||
openApiUrl.concat(apiDocsUrl)); | ||
return "index"; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<!DOCTYPE html> | ||
<html lang="es" xmlns:th="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>ExchangeRatesApi</title> | ||
<style> | ||
body { | ||
font-family: Arial, sans-serif; | ||
text-align: center; | ||
background-color: #f4f4f4; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100vh; | ||
} | ||
.container { | ||
display: inline-block; | ||
padding: 20px; | ||
background-color: white; | ||
border-radius: 10px; | ||
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1); | ||
max-width: 400px; | ||
width: 90%; | ||
} | ||
h1 { | ||
color: #333; | ||
} | ||
h2 { | ||
color: #555; | ||
font-size: 1.2em; | ||
margin: 10px 0; | ||
} | ||
.button { | ||
display: block; | ||
margin: 10px auto; | ||
padding: 10px 20px; | ||
text-decoration: none; | ||
color: white; | ||
background-color: #007BFF; | ||
border-radius: 5px; | ||
transition: background-color 0.3s, transform 0.3s; | ||
} | ||
.button:hover { | ||
background-color: #0056b3; | ||
transform: scale(1.05); | ||
} | ||
.button i { | ||
margin-right: 8px; | ||
} | ||
p { | ||
margin-top: 15px; | ||
font-size: 0.9em; | ||
color: #777; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<h1>ExchangeRatesApi</h1> | ||
<p>Información actualizada sobre las tasas de cambio de USD y otras monedas en Argentina. También sobre el valor de acciones en USD.</p> | ||
<a class="button" th:href="|${urlSwaggerDoc}|"><i class="fas fa-book"></i> Documentación Swagger</a> | ||
<a class="button" th:href="|${urlJsonDoc}|"><i class="fas fa-file-alt"></i> Documentación JSON</a> | ||
</div> | ||
</body> | ||
</html> |