FEAT : Mise en place de l'architecture + instription d'un utilisateur
This commit is contained in:
@@ -3,7 +3,7 @@ spring.application.name=FotoSharing
|
||||
# ===============================
|
||||
# DATABASE
|
||||
# ===============================
|
||||
spring.datasource.url=jdbc:mariadb://192.168.124.171:3306/fotoshareDB
|
||||
spring.datasource.url=jdbc:mariadb://192.168.112.10:3306/fotoshareDB
|
||||
spring.datasource.username=ufoto
|
||||
spring.datasource.password=4AinfoRep-25
|
||||
# ===============================
|
||||
@@ -12,6 +12,14 @@ spring.datasource.password=4AinfoRep-25
|
||||
spring.jpa.hibernate.ddl-auto=update
|
||||
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MariaDBDialect
|
||||
spring.jpa.show-sql=true
|
||||
spring.jpa.properties.hibernate.format_sql=true
|
||||
spring.thymeleaf.prefix=classpath:/templates/
|
||||
spring.thymeleaf.suffix=.html
|
||||
spring.thymeleaf.mode=HTML
|
||||
spring.jpa.properties.hibernate.jdbc.time_zone=UTC
|
||||
# ===============================
|
||||
# EMPLACEMENT DE STICKAGE
|
||||
# ===============================
|
||||
file.upload-dir=/opt/photo-app/uploads
|
||||
spring.servlet.multipart.max-file-size=20MB
|
||||
spring.servlet.multipart.max-request-size=20MB
|
||||
Binary file not shown.
Binary file not shown.
BIN
target/classes/local/epul4a/fotosharing/model/Commentaire.class
Normal file
BIN
target/classes/local/epul4a/fotosharing/model/Commentaire.class
Normal file
Binary file not shown.
BIN
target/classes/local/epul4a/fotosharing/model/Partage.class
Normal file
BIN
target/classes/local/epul4a/fotosharing/model/Partage.class
Normal file
Binary file not shown.
Binary file not shown.
BIN
target/classes/local/epul4a/fotosharing/model/Photo.class
Normal file
BIN
target/classes/local/epul4a/fotosharing/model/Photo.class
Normal file
Binary file not shown.
BIN
target/classes/local/epul4a/fotosharing/model/Utilisateur.class
Normal file
BIN
target/classes/local/epul4a/fotosharing/model/Utilisateur.class
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
9
target/classes/templates/home.html
Normal file
9
target/classes/templates/home.html
Normal file
@@ -0,0 +1,9 @@
|
||||
<!doctype html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head><meta charset="utf-8"/><title>Accueil</title></head>
|
||||
<body>
|
||||
<h1>Bienvenue sur FotoSharing</h1>
|
||||
<p><a th:href="@{/upload}">Uploader une photo</a></p>
|
||||
<p><a th:href="@{/logout}">Se déconnecter</a></p>
|
||||
</body>
|
||||
</html>
|
||||
23
target/classes/templates/login.html
Normal file
23
target/classes/templates/login.html
Normal file
@@ -0,0 +1,23 @@
|
||||
<!doctype html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>Login - FotoSharing</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Connexion</h1>
|
||||
<form th:action="@{/login}" method="post">
|
||||
<label>Email: <input type="text" name="username"/></label><br/>
|
||||
<label>Mot de passe: <input type="password" name="password"/></label><br/>
|
||||
<button type="submit">Se connecter</button>
|
||||
</form>
|
||||
|
||||
<div th:if="${param.logout}">
|
||||
Déconnecté avec succès.
|
||||
</div>
|
||||
<div th:if="${param.error}">
|
||||
Erreur d'authentification.
|
||||
</div>
|
||||
<p><a th:href="@{/register}">Créer un compte</a></p>
|
||||
</body>
|
||||
</html>
|
||||
17
target/classes/templates/register.html
Normal file
17
target/classes/templates/register.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<!doctype html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>Inscription - FotoSharing</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Inscription</h1>
|
||||
<form th:action="@{/register}" th:object="${utilisateur}" method="post">
|
||||
<label>Email: <input th:field="*{email}" /></label><br/>
|
||||
<label>Nom: <input th:field="*{nom}" /></label><br/>
|
||||
<label>Prénom: <input th:field="*{prenom}" /></label><br/>
|
||||
<label>Mot de passe: <input th:field="*{motDePasse}" type="password"/></label><br/>
|
||||
<button type="submit">Créer</button>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
23
target/classes/templates/upload.html
Normal file
23
target/classes/templates/upload.html
Normal file
@@ -0,0 +1,23 @@
|
||||
<!doctype html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>Upload - FotoSharing</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Uploader une photo</h1>
|
||||
<form th:action="@{/upload}" method="post" enctype="multipart/form-data">
|
||||
<input type="file" name="file"/><br/>
|
||||
<label>Visibilité:
|
||||
<select name="visibilite">
|
||||
<option value="PRIVATE">Privée</option>
|
||||
<option value="PUBLIC">Publique</option>
|
||||
<option value="SHARED">Partagée</option>
|
||||
</select>
|
||||
</label><br/>
|
||||
<button type="submit">Envoyer</button>
|
||||
</form>
|
||||
<div th:if="${error}" th:text="${error}"></div>
|
||||
<div th:if="${message}" th:text="${message}"></div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user