Merge remote-tracking branch 'origin/endpoints' into jpa
This commit is contained in:
@@ -103,6 +103,12 @@
|
|||||||
<version>1.18.32</version>
|
<version>1.18.32</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springdoc</groupId>
|
||||||
|
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
|
||||||
|
<version>2.5.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package hackathon.FrisbYEE.jpa.dto;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class AthleteDTO implements java.io.Serializable {
|
||||||
|
|
||||||
|
private String nom;
|
||||||
|
private String niveau;
|
||||||
|
private String categorie;
|
||||||
|
private List<String> groupes;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package hackathon.FrisbYEE.rest;
|
||||||
|
|
||||||
|
public class ActiviteResources {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package hackathon.FrisbYEE.rest;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Content;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
|
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import hackathon.FrisbYEE.jpa.service.AthleteDAO;
|
||||||
|
|
||||||
|
public class AthleteResource {
|
||||||
|
|
||||||
|
private AthleteDAO athleteDAO;
|
||||||
|
|
||||||
|
@Operation(summary = "Récupère tous les utilisateurs")
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(responseCode = "200", description = "Récupère le Joueur ayant l'identifiant correspondant",
|
||||||
|
content = @Content(mediaType = "application/json",
|
||||||
|
schema = @Schema(implementation = JoueurDTO.class)))
|
||||||
|
})
|
||||||
|
@GetMapping("/joueur/{id}")
|
||||||
|
public JoueurDTO getJoueurById(@PathVariable Integer joueurId) {
|
||||||
|
// return pet
|
||||||
|
System.out.println("ID A CHERCHER" + joueurId);
|
||||||
|
IJoueur j = dao.findOne(joueurId);
|
||||||
|
JoueurDTO jDTO = new JoueurDTO(null, null);
|
||||||
|
System.out.println(j);
|
||||||
|
return jDTO;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1 +1,11 @@
|
|||||||
spring.application.name=FrisbYEE
|
spring.datasource.url=jdbc:postgresql://localhost:5432/frisbyee
|
||||||
|
spring.datasource.username=postgres
|
||||||
|
spring.datasource.password=postgres
|
||||||
|
spring.datasource.driver-class-name=org.postgresql.Driver
|
||||||
|
|
||||||
|
spring.jpa.hibernate.ddl-auto=update
|
||||||
|
spring.jpa.show-sql=true
|
||||||
|
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
|
||||||
|
spring.datasource.url=jdbc:postgresql://localhost:5432/frisbyee
|
||||||
|
spring.datasource.username=frisbyee_user
|
||||||
|
spring.datasource.password=secret
|
||||||
@@ -27,3 +27,20 @@ services:
|
|||||||
interval: 5s
|
interval: 5s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 20
|
retries: 20
|
||||||
|
postgres:
|
||||||
|
image: postgres:16
|
||||||
|
container_name: frisbyee-postgres
|
||||||
|
ports:
|
||||||
|
- "5432:5432"
|
||||||
|
environment:
|
||||||
|
POSTGRES_DB: frisbyee
|
||||||
|
POSTGRES_USER: frisbyee_user
|
||||||
|
POSTGRES_PASSWORD: secret
|
||||||
|
volumes:
|
||||||
|
- postgres_data:/var/lib/postgresql/data
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
postgres_data:
|
||||||
|
|
||||||
|
version: "3.9"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user