Add all layers.
This commit is contained in:
29
sportshub-application/pom.xml
Normal file
29
sportshub-application/pom.xml
Normal file
@@ -0,0 +1,29 @@
|
||||
<?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>
|
||||
<parent>
|
||||
<groupId>org.sportshub</groupId>
|
||||
<artifactId>sportshub-parent</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
|
||||
<artifactId>sportshub-application</artifactId>
|
||||
|
||||
<name>sportshub-application</name>
|
||||
<description>Demo project for Spring Boot</description>
|
||||
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.sportshub</groupId>
|
||||
<artifactId>sportshub-domain</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,21 @@
|
||||
package org.sportshub.application.user;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.sportshub.domain.user.model.User;
|
||||
import org.sportshub.domain.user.port.UserPort;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class UserUseCases {
|
||||
private final UserPort userPort;
|
||||
|
||||
public UserUseCases(final UserPort userPort) {
|
||||
this.userPort = userPort;
|
||||
}
|
||||
|
||||
public Optional<User> findById(UUID userId) {
|
||||
return userPort.findById(userId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user