Skip to content

Commit

Permalink
refact: change the structure to endpoints been see for other components
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Rodrigues committed Jun 7, 2021
1 parent cfff6c0 commit cbec3e5
Show file tree
Hide file tree
Showing 9 changed files with 111 additions and 65 deletions.
13 changes: 4 additions & 9 deletions adapter-gateway/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,8 @@
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>adapter-database</artifactId>
<artifactId>adapter-gateway</artifactId>
<dependencies>
<dependency>
<groupId>br.com.ivan</groupId>
<artifactId>boundary-gateway</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>com.h2database</groupId>
Expand All @@ -28,9 +23,9 @@
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>13.0</version>
<groupId>br.com.ivan</groupId>
<artifactId>boundary-gateway</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
import br.com.ivan.entitty.UserEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.stream.Collectors;

@Repository
@Transactional
public class UserRepositoryImpl implements UserRepository {

@Autowired
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
@AllArgsConstructor
public class UserEntity {

public UserEntity() {

}

@Id
private Long id;

Expand Down
2 changes: 1 addition & 1 deletion adapter-gateway/src/main/resources/data.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CREATE TABLE tb_user (
id INT AUTO_INCREMENT PRIMARY KEY,
id INT AUTO_INCREMENT PRIMARY KEY,
first_name VARCHAR(250) NOT NULL,
last_name VARCHAR(250) NOT NULL,
email VARCHAR(250) NOT NULL,
Expand Down
53 changes: 53 additions & 0 deletions application/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<parent>
<artifactId>clean</artifactId>
<groupId>br.com.ivan</groupId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>application</artifactId>

<dependencies>
<dependency>
<groupId>br.com.ivan</groupId>
<artifactId>adapter-gateway</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>br.com.ivan</groupId>
<artifactId>usecase</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>br.com.ivan</groupId>
<artifactId>adapter-web</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>br.com.ivan</groupId>
<artifactId>boundary-web</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>br.com.ivan</groupId>
<artifactId>boundary-usecase</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>br.com.ivan</groupId>
<artifactId>boundary-gateway</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependencies>

</project>
100 changes: 47 additions & 53 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,61 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>

<modules>
<module>application</module>
<module>entity</module>

<module>boundary-gateway</module>
<module>boundary-usecase</module>
<module>boundary-web</module>

<module>adapter-gateway</module>
<module>usecase</module>
<module>entity</module>
<module>boundary-gateway</module>
<module>adapter-gateway</module>
<module>boundary-web</module>
<module>adapter-web</module>
<module>boundary-usecase</module>
</modules>
<module>adapter-web</module>
</modules>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.0</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>br.com.ivan</groupId>
<artifactId>clean</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>clean</name>
<description>Multimodule project using maven</description>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>

<!-- <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
<version>2.5.0</version>
</dependency>-->

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.20</version>
<scope>provided</scope>
</dependency>


</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.0</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

<groupId>br.com.ivan</groupId>
<artifactId>clean</artifactId>
<version>0.0.1-SNAPSHOT</version>


<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.20</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

</project>
1 change: 0 additions & 1 deletion src/main/resources/application.properties

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package br.com.ivan.usecase;

import br.com.ivan.*;
import br.com.ivan.clean.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

Expand Down

0 comments on commit cbec3e5

Please sign in to comment.