-
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.
added message editor and message list
- Loading branch information
1 parent
fc54c97
commit 1fb6103
Showing
44 changed files
with
3,594 additions
and
722 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
16 changes: 0 additions & 16 deletions
16
src/main/java/com/example/sweater/config/EncriptionConfig.java
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
server.port=8090 | ||
spring.datasource.url=jdbc:postgresql://localhost/sweater | ||
spring.datasource.username=postgres | ||
spring.datasource.password=1234 | ||
|
@@ -6,21 +7,20 @@ spring.jpa.show-sql=false | |
spring.jpa.hibernate.ddl-auto=validate | ||
|
||
spring.freemarker.expose-request-attributes=true | ||
spring.main.allow-bean-definition-overriding=true | ||
|
||
spring.mail.host=smtp.yandex.ru | ||
spring.mail.username[email protected] | ||
spring.mail.password=KuKaS123 | ||
spring.mail.port=465 | ||
spring.mail.protocol=smtps | ||
mail.debug=false | ||
mail.debug=true | ||
|
||
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true | ||
|
||
upload.path=/home/ec2-user/uploads | ||
upload.path=/C:/Users/Zver/IdeaProjects/sweater/uploads | ||
|
||
recaptcha.secret=6Ld5H-oUAAAAAFVpIcBbCt0QxU7W5pRt-rF5TeTw | ||
|
||
spring.session.jdbc.initialize-schema=always | ||
spring.session.jdbc.table-name=SPRING_SESSION | ||
|
||
myhostname=3.10.190.24 | ||
spring.session.jdbc.table-name=SPRING_SESSION |
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 |
---|---|---|
@@ -1,33 +1,31 @@ | ||
create sequence hibernate_sequence start 1 increment 1; | ||
|
||
create table message ( | ||
id int8 not null, | ||
filename varchar(255), | ||
tag varchar(255), | ||
text varchar(2048) not null, | ||
user_id int8, | ||
primary key (id) | ||
id int8 not null, | ||
filename varchar(255), | ||
tag varchar(255), | ||
text varchar(2048) not null, | ||
user_id int8, | ||
primary key (id) | ||
); | ||
|
||
create table user_role ( | ||
user_id int8 not null, | ||
roles varchar(255) | ||
user_id int8 not null, | ||
roles varchar(255) | ||
); | ||
|
||
create table usr ( | ||
id int8 not null, | ||
activation_code varchar(255), | ||
active boolean not null, | ||
email varchar(255), | ||
password varchar(255) not null, | ||
username varchar(255) not null, | ||
primary key (id) | ||
id int8 not null, | ||
active boolean not null, | ||
password varchar(255) not null, | ||
username varchar(255) not null, | ||
primary key (id) | ||
); | ||
|
||
alter table if exists message | ||
add constraint message_user_fk | ||
foreign key (user_id) references usr; | ||
|
||
alter table if exists user_role | ||
add constraint user_role_user_fk | ||
foreign key (user_id) references usr; | ||
add constraint user_role_user_fk | ||
foreign key (user_id) references usr; |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
insert into usr (id, username, password, active) | ||
values (1, 'admin', '123', true); | ||
INSERT INTO usr (id, username, password, active) | ||
VALUES (1, 'admin', '123', true); | ||
|
||
insert into user_role (user_id, roles) | ||
values (1, 'USER'), (1, 'ADMIN'); | ||
INSERT INTO user_role (user_id, roles) | ||
VALUES (1, 'USER'), (1, 'ADMIN'); |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
create extension if not exists pgcrypto; | ||
|
||
update usr set password = crypt(password, gen_salt('bf', 8)); | ||
update usr set password = crypt(password, gen_salt('bf', 8)) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
<#import "parts/common.ftlh" as c> | ||
|
||
<@c.page> | ||
<div class="form-row"> | ||
<div class="form-group col-md-6"> | ||
<form method="get" action="/main" class="form-inline"> | ||
<input type="text" name="filter" class="form-control" value="${filter?ifExists}" placeholder="Search by tag"> | ||
<button type="submit" class="btn btn-primary ml-2">Search</button> | ||
</form> | ||
<div class="form-row"> | ||
<div class="form-group col-md-6"> | ||
<form method="get" action="/main" class="form-inline"> | ||
<input type="text" name="filter" class="form-control" value="${filter?ifExists}" placeholder="Search by tag"> | ||
<button type="submit" class="btn btn-primary ml-2">Search</button> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<#include "parts/messageEdit.ftlh" /> | ||
<#include "parts/messageEdit.ftlh" /> | ||
|
||
<#include "parts/messageList.ftlh" /> | ||
<#include "parts/messageList.ftlh" /> | ||
|
||
</@c.page> | ||
</@c.page> |
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 |
---|---|---|
@@ -1,27 +1,27 @@ | ||
<#macro page> | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Sweater</title> | ||
<link rel="stylesheet" href="/static/style.css"> | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Sweater</title> | ||
<link rel="stylesheet" href="/static/style.css"> | ||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
|
||
<!-- Bootstrap CSS --> | ||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous"> | ||
<script src='https://www.google.com/recaptcha/api.js'></script> | ||
</head> | ||
<body> | ||
<#include "navbar.ftlh"> | ||
<div class="container mt-5"> | ||
<#nested> | ||
</div> | ||
<!-- Optional JavaScript --> | ||
<!-- jQuery first, then Popper.js, then Bootstrap JS --> | ||
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script> | ||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js" integrity="sha384-smHYKdLADwkXOn1EmN1qk/HfnUcbVRZyYmZ4qpPea6sjB/pTJ0euyQp0Mk8ck+5T" crossorigin="anonymous"></script> | ||
</body> | ||
</html> | ||
</#macro> | ||
<!-- Bootstrap CSS --> | ||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous"> | ||
<script src='https://www.google.com/recaptcha/api.js'></script> | ||
</head> | ||
<body> | ||
<#include "navbar.ftlh"> | ||
<div class="container mt-5"> | ||
<#nested> | ||
</div> | ||
<!-- Optional JavaScript --> | ||
<!-- jQuery first, then Popper.js, then Bootstrap JS --> | ||
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script> | ||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js" integrity="sha384-smHYKdLADwkXOn1EmN1qk/HfnUcbVRZyYmZ4qpPea6sjB/pTJ0euyQp0Mk8ck+5T" crossorigin="anonymous"></script> | ||
</body> | ||
</html> | ||
</#macro> |
Oops, something went wrong.