Skip to content

Commit

Permalink
Merge pull request #37 from ADORSYS-GIS/fpo-obs-project-structure
Browse files Browse the repository at this point in the history
Fpo obs project structure
  • Loading branch information
Koufan-De-King authored Oct 22, 2024
2 parents 65a1f2e + 8b6d9f1 commit 883f1b7
Show file tree
Hide file tree
Showing 26 changed files with 765 additions and 87 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/develop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ jobs:
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: cd online-banking-service && mvn clean install
run: mvn clean install

#Add pmd check
44 changes: 44 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
### Maven ###
target/
!.mvn/wrapper/maven-wrapper.jar
pom.xml.versionsBackup

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache

### IntelliJ IDEA ###
!.idea
.idea/*
!.idea/copyright/

*.iws
*.iml
*.ipr

### NetBeans ###
nbproject/private/
build/
nbbuild/
dist/
nbdist/
.nb-gradle/

### Other ###
bin/
.factorypath
*.log
logs
log
.vscode

.DS_Store
.springBeans

cms-db-schema/liquibase.properties
ledgers-db/liquibase.properties
57 changes: 57 additions & 0 deletions obs/obs-rest-api/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?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">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.adorsys.webank</groupId>
<artifactId>obs</artifactId>
<version>0.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>obs-rest-api</artifactId>

<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<ruleset.basedir>../..</ruleset.basedir>
</properties>

<dependencies>
<!-- OBS Service API -->
<dependency>
<groupId>com.adorsys.webank</groupId>
<artifactId>obs-service-api</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>

<!-- Swagger Annotations -->
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations-jakarta</artifactId>
<version>2.2.22</version>
<scope>compile</scope>
</dependency>

<!-- Spring Boot Starter for Web -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>3.1.4</version>
<scope>compile</scope>
</dependency>

<!-- Spring Boot Starter for Testing -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>3.1.4</version>
<scope>test</scope>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.adorsys.webank.obs;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@RequestMapping("/api/obs")
public interface OBSRestApi {

@GetMapping("/message")
@ResponseBody
String getMessage();
}

49 changes: 49 additions & 0 deletions obs/obs-rest-server/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2018-2023 adorsys GmbH and Co. KG
~ All rights are reserved.
-->

<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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.adorsys.webank</groupId>
<artifactId>obs</artifactId>
<version>0.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>obs-rest-server</artifactId>

<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<ruleset.basedir>../..</ruleset.basedir>
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.adorsys.webank</groupId>
<artifactId>obs-service-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.adorsys.webank</groupId>
<artifactId>obs-rest-api</artifactId>
<version>${project.version}</version>
</dependency>

<!-- Other existing dependencies -->
</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.adorsys.webank.obs;

import org.springframework.web.bind.annotation.RestController;
import org.springframework.beans.factory.annotation.Autowired;

@RestController
public class OBSRestServer implements OBSRestApi {

private final OBSServiceApi obsService;

@Autowired
public OBSRestServer(OBSServiceApi obsService) {
this.obsService = obsService;
}

@Override
public String getMessage() {
return obsService.getMessage();
}
}

42 changes: 42 additions & 0 deletions obs/obs-service-api/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2018-2024 adorsys GmbH and Co. KG
~ All rights are reserved.
-->

<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">
<modelVersion>4.0.0</modelVersion>

<artifactId>obs-service-api</artifactId>

<description>Online Banking Service API</description>

<parent>
<groupId>com.adorsys.webank</groupId>
<artifactId>obs</artifactId>
<version>0.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<properties>
<ruleset.basedir>../..</ruleset.basedir>
</properties>

<dependencies>

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

<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>

</dependencies>


</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package com.adorsys.webank.obs;

public interface OBSServiceApi {
String getMessage();
}

57 changes: 57 additions & 0 deletions obs/obs-service-impl/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2018-2024 adorsys GmbH and Co. KG
~ All rights are reserved.
-->

<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">
<modelVersion>4.0.0</modelVersion>

<artifactId>obs-service-impl</artifactId>
<packaging>jar</packaging>

<description>Online Banking Service Impl module</description>
<parent>
<groupId>com.adorsys.webank</groupId>
<artifactId>obs</artifactId>
<version>0.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>


<properties>
<ruleset.basedir>../..</ruleset.basedir>
</properties>

<dependencies>

<!-- project dependencies -->
<dependency>
<groupId>com.adorsys.webank</groupId>
<artifactId>obs-service-api</artifactId>
<version>${project.version}</version>
</dependency>

<!-- other dependencies -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<exclusions>
<exclusion>
<groupId>org.skyscreamer</groupId>
<artifactId>jsonassert</artifactId>
</exclusion>
</exclusions>
<scope>test</scope>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.adorsys.webank.obs;

import org.springframework.stereotype.Service;

@Service
public class OBSServiceImpl implements OBSServiceApi {

@Override
public String getMessage() {
return "Hello from the OBS Service!";
}
}
36 changes: 36 additions & 0 deletions obs/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<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">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.adorsys.webank</groupId>
<artifactId>webank-OnlineBanking</artifactId>
<version>0.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>obs</artifactId>
<version>0.1-SNAPSHOT</version>
<packaging>pom</packaging>

<modules>
<module>obs-rest-api</module>
<module>obs-rest-server</module>
<module>obs-service-api</module>
<module>obs-service-impl</module>
</modules>


<properties>
<!-- Common properties -->
<java.version>17</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<ruleset.basedir>${project.basedir}</ruleset.basedir>
<dependency.locations.enabled>false</dependency.locations.enabled>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

</properties>

</project>
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 883f1b7

Please sign in to comment.