Skip to content

Commit 0cfc2ae

Browse files
authored
Merge pull request #7 from Pyrokines17/lab5
Lab5
2 parents 36e6eee + 1394f2a commit 0cfc2ae

64 files changed

Lines changed: 4142 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎lab5/.env‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
POSTGRES_USER=user
2+
POSTGRES_PW=1234
3+
POSTGRES_DB=postgres
4+
PGADMIN_MAIL=test@gmail.com
5+
PGADMIN_PW=test

‎lab5/.gitignore‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
target/
2+
!.mvn/wrapper/maven-wrapper.jar
3+
!**/src/main/**/target/
4+
!**/src/test/**/target/
5+
6+
### IntelliJ IDEA ###
7+
.idea/modules.xml
8+
.idea/jarRepositories.xml
9+
.idea/compiler.xml
10+
.idea/libraries/
11+
*.iws
12+
*.iml
13+
*.ipr
14+
15+
### Eclipse ###
16+
.apt_generated
17+
.classpath
18+
.factorypath
19+
.project
20+
.settings
21+
.springBeans
22+
.sts4-cache
23+
24+
### NetBeans ###
25+
/nbproject/private/
26+
/nbbuild/
27+
/dist/
28+
/nbdist/
29+
/.nb-gradle/
30+
build/
31+
!**/src/main/**/build/
32+
!**/src/test/**/build/
33+
34+
### VS Code ###
35+
.vscode/
36+
37+
### Mac OS ###
38+
.DS_Store

‎lab5/compose.yaml‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
services:
2+
postgres:
3+
container_name: postgres1
4+
image: postgres:latest
5+
environment:
6+
- POSTGRES_USER=${POSTGRES_USER}
7+
- POSTGRES_PASSWORD=${POSTGRES_PW}
8+
- POSTGRES_DB=${POSTGRES_DB}
9+
ports:
10+
- "5432:5432"
11+
restart: always
12+
volumes:
13+
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
14+
15+
pgadmin:
16+
container_name: pgadmin
17+
image: dpage/pgadmin4:latest
18+
environment:
19+
- PGADMIN_DEFAULT_EMAIL=${PGADMIN_MAIL}
20+
- PGADMIN_DEFAULT_PASSWORD=${PGADMIN_PW}
21+
ports:
22+
- "5050:80"
23+
restart: always

‎lab5/config.txt‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
POSTGRES_IP=localhost
2+
POSTGRES_PORT=5432
3+
POSTGRES_NAME=postgres
4+
POSTGRES_USERNAME=user
5+
POSTGRES_PASSWORD=1234
6+
SERVER_IP=localhost
7+
SERVER_PORT=8008
8+
SERVER_LOGGING=true

‎lab5/init.sql‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CREATE TABLE accounts (
2+
user_id SERIAL PRIMARY KEY,
3+
username TEXT UNIQUE NOT NULL,
4+
password TEXT NOT NULL,
5+
email TEXT UNIQUE NOT NULL,
6+
created_at TIMESTAMP NOT NULL,
7+
last_login TIMESTAMP
8+
);

‎lab5/pom.xml‎

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>ru.nsu.gunko</groupId>
8+
<artifactId>lab5</artifactId>
9+
<version>1.0-SNAPSHOT</version>
10+
11+
<properties>
12+
<maven.compiler.source>21</maven.compiler.source>
13+
<maven.compiler.target>21</maven.compiler.target>
14+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
15+
</properties>
16+
17+
<dependencies>
18+
<dependency>
19+
<groupId>org.postgresql</groupId>
20+
<artifactId>postgresql</artifactId>
21+
<version>42.7.3</version>
22+
</dependency>
23+
<dependency>
24+
<groupId>jakarta.xml.bind</groupId>
25+
<artifactId>jakarta.xml.bind-api</artifactId>
26+
<version>4.0.2</version>
27+
</dependency>
28+
<dependency>
29+
<groupId>jakarta.activation</groupId>
30+
<artifactId>jakarta.activation-api</artifactId>
31+
<version>2.1.3</version>
32+
</dependency>
33+
<dependency>
34+
<groupId>com.sun.xml.bind</groupId>
35+
<artifactId>jaxb-impl</artifactId>
36+
<version>4.0.0</version>
37+
<scope>runtime</scope>
38+
</dependency>
39+
<dependency>
40+
<groupId>org.springframework.security</groupId>
41+
<artifactId>spring-security-core</artifactId>
42+
<version>6.2.4</version>
43+
</dependency>
44+
<dependency>
45+
<groupId>org.apache.commons</groupId>
46+
<artifactId>commons-collections4</artifactId>
47+
<version>4.5.0-M1</version>
48+
</dependency>
49+
<dependency>
50+
<groupId>com.vdurmont</groupId>
51+
<artifactId>emoji-java</artifactId>
52+
<version>5.1.1</version>
53+
</dependency>
54+
</dependencies>
55+
56+
<build>
57+
<pluginManagement>
58+
<plugins>
59+
<plugin>
60+
<groupId>org.apache.maven.plugins</groupId>
61+
<artifactId>maven-dependency-plugin</artifactId>
62+
<version>3.2.0</version>
63+
</plugin>
64+
<plugin>
65+
<groupId>org.apache.maven.plugins</groupId>
66+
<artifactId>maven-jar-plugin</artifactId>
67+
<version>3.2.0</version>
68+
</plugin>
69+
</plugins>
70+
</pluginManagement>
71+
<plugins>
72+
<plugin>
73+
<groupId>org.apache.maven.plugins</groupId>
74+
<artifactId>maven-dependency-plugin</artifactId>
75+
<executions>
76+
<execution>
77+
<id>copy-dependencies</id>
78+
<phase>prepare-package</phase>
79+
<goals>
80+
<goal>copy-dependencies</goal>
81+
</goals>
82+
<configuration>
83+
<outputDirectory>
84+
${project.build.directory}/libs
85+
</outputDirectory>
86+
</configuration>
87+
</execution>
88+
</executions>
89+
</plugin>
90+
<plugin>
91+
<groupId>org.apache.maven.plugins</groupId>
92+
<artifactId>maven-jar-plugin</artifactId>
93+
<configuration>
94+
<archive>
95+
<manifest>
96+
<addClasspath>true</addClasspath>
97+
<classpathPrefix>libs/</classpathPrefix>
98+
</manifest>
99+
</archive>
100+
</configuration>
101+
</plugin>
102+
</plugins>
103+
</build>
104+
105+
</project>

0 commit comments

Comments
 (0)