Skip to content

Commit 27ca478

Browse files
committed
user-service module created, setup is done for project bases
1 parent 49909e0 commit 27ca478

File tree

7 files changed

+129
-0
lines changed

7 files changed

+129
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,5 @@ bin/
9393
/discovery-server/target/
9494
/api-gateway/target/
9595
/logging-service/target/
96+
/user-service/target/
9697
/frontend/build/
Binary file not shown.

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
<module>discovery-server</module>
2222
<module>api-gateway</module>
2323
<module>logging-service</module>
24+
<module>user-service</module>
2425
</modules>
2526

2627
<properties>

user-service/pom.xml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
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+
<parent>
7+
<groupId>com.csaba79coder</groupId>
8+
<artifactId>best-protocol</artifactId>
9+
<version>3.0.2</version>
10+
</parent>
11+
12+
<artifactId>user-service</artifactId>
13+
14+
<properties>
15+
<java.version>17</java.version>
16+
<maven.compiler.source>17</maven.compiler.source>
17+
<maven.compiler.target>17</maven.compiler.target>
18+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
19+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
20+
<project.version>3.0.0-SNAPSHOT</project.version>
21+
<spring-cloud.version>2022.0.2</spring-cloud.version>
22+
</properties>
23+
24+
<dependencies>
25+
<dependency>
26+
<groupId>org.springframework.boot</groupId>
27+
<artifactId>spring-boot-starter-web</artifactId>
28+
</dependency>
29+
30+
<dependency>
31+
<groupId>org.yaml</groupId>
32+
<artifactId>snakeyaml</artifactId>
33+
<version>2.0</version>
34+
</dependency>
35+
36+
<dependency>
37+
<groupId>org.springframework.boot</groupId>
38+
<artifactId>spring-boot-starter-data-jpa</artifactId>
39+
</dependency>
40+
41+
<dependency>
42+
<groupId>org.springframework.boot</groupId>
43+
<artifactId>spring-boot-devtools</artifactId>
44+
<scope>runtime</scope>
45+
<optional>true</optional>
46+
</dependency>
47+
48+
<dependency>
49+
<groupId>org.springframework.cloud</groupId>
50+
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
51+
</dependency>
52+
53+
<dependency>
54+
<groupId>com.mysql</groupId>
55+
<artifactId>mysql-connector-j</artifactId>
56+
<scope>runtime</scope>
57+
</dependency>
58+
59+
<dependency>
60+
<groupId>org.projectlombok</groupId>
61+
<artifactId>lombok</artifactId>
62+
<optional>true</optional>
63+
</dependency>
64+
65+
<dependency>
66+
<groupId>org.modelmapper</groupId>
67+
<artifactId>modelmapper</artifactId>
68+
<version>3.1.1</version>
69+
</dependency>
70+
71+
<dependency>
72+
<groupId>org.springframework.boot</groupId>
73+
<artifactId>spring-boot-starter-test</artifactId>
74+
<scope>test</scope>
75+
</dependency>
76+
77+
<dependency>
78+
<groupId>com.h2database</groupId>
79+
<artifactId>h2</artifactId>
80+
<scope>test</scope>
81+
</dependency>
82+
</dependencies>
83+
84+
</project>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.csaba79coder.userservice;
2+
3+
import org.springframework.boot.SpringApplication;
4+
import org.springframework.boot.autoconfigure.SpringBootApplication;
5+
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
6+
7+
@SpringBootApplication
8+
@EnableDiscoveryClient // added @EnableDiscoveryClient for this to work as a discovery client
9+
public class UserServiceApplication {
10+
11+
public static void main(String[] args) {
12+
SpringApplication.run(UserServiceApplication.class, args);
13+
}
14+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
spring.jpa.hibernate.ddl-auto=update
2+
spring.datasource.url=jdbc:mysql://localhost:${DB_PORT_MYSQL}/${DB_URL_MYSQL_USER}?createDatabaseIfNotExist=true
3+
spring.datasource.username=${DB_USER_MYSQL}
4+
spring.datasource.password=${DB_PASSWORD_MYSQL}
5+
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL55Dialect
6+
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
7+
spring.jpa.show-sql=true
8+
#spring.jpa.properties.hibernate.format_sql=true
9+
server.port=0
10+
11+
eureka.client.serviceUrl.defaultZone=http://localhost:8761/eureka
12+
13+
spring.application.name=user-service
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
${AnsiColor.BLUE}
2+
███████████ █████ ███████████ █████ ████
3+
░░███░░░░░███ ░░███ ░░███░░░░░███ ░░███ ░░███
4+
░███ ░███ ██████ █████ ███████ ░███ ░███ ████████ ██████ ███████ ██████ ██████ ██████ ░███
5+
░██████████ ███░░███ ███░░ ░░░███░ ░██████████ ░░███░░███ ███░░███░░░███░ ███░░███ ███░░███ ███░░███ ░███
6+
░███░░░░░███░███████ ░░█████ ░███ ░███░░░░░░ ░███ ░░░ ░███ ░███ ░███ ░███ ░███░███ ░░░ ░███ ░███ ░███
7+
░███ ░███░███░░░ ░░░░███ ░███ ███ ░███ ░███ ░███ ░███ ░███ ███░███ ░███░███ ███░███ ░███ ░███
8+
███████████ ░░██████ ██████ ░░█████ █████ █████ ░░██████ ░░█████ ░░██████ ░░██████ ░░██████ █████
9+
░░░░░░░░░░░ ░░░░░░ ░░░░░░ ░░░░░ ░░░░░ ░░░░░ ░░░░░░ ░░░░░ ░░░░░░ ░░░░░░ ░░░░░░ ░░░░░
10+
11+
12+
13+
${spring-boot.formatted-version}
14+
${application.title}
15+
${application.version}
16+

0 commit comments

Comments
 (0)