Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix onlinebanking to run from the online-banking-app module. #86

Merged
merged 2 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

This file was deleted.

16 changes: 0 additions & 16 deletions obs/obs-rest/src/test/resources/application.properties

This file was deleted.

18 changes: 18 additions & 0 deletions online-banking-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,17 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
<dependency>
<groupId>de.adorsys.webank</groupId>
<artifactId>webank-bank-account-service-impl</artifactId>
<version>0.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>de.adorsys.ledgers</groupId>
<artifactId>ledgers-postings-service-impl</artifactId>
<scope>compile</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
Expand All @@ -98,6 +109,13 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
<configuration>
<excludes>
<exclude>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.adorsys.webank.obs.Config;
package com.adorsys.webank.Config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,39 @@
package com.adorsys.webank;

import com.adorsys.webank.obs.EnableObsServiceimpl;
import de.adorsys.ledgers.postings.impl.EnablePostingService;
import de.adorsys.webank.bank.api.service.BankAccountInitService;
import de.adorsys.webank.bank.api.service.EnableBankAccountService;
import de.adorsys.webank.bank.server.utils.client.ExchangeRateClient;
import org.jetbrains.annotations.NotNull;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ApplicationListener;


@SpringBootApplication
@SpringBootApplication(exclude = {SecurityAutoConfiguration.class})
@EnableBankAccountService
@EnablePostingService
@EnableFeignClients(basePackageClasses = ExchangeRateClient.class)
@EnableObsServiceimpl
public class OnlineBankingApplication {
public class OnlineBankingApplication implements ApplicationListener<ApplicationReadyEvent> {

private final BankAccountInitService bankInitService;

@Autowired
public OnlineBankingApplication(BankAccountInitService bankInitService) {
this.bankInitService = bankInitService;
}

public static void main(String[] args) {
SpringApplication.run(OnlineBankingApplication.class, args);
}

public static void main(String[] args) {
SpringApplication.run(OnlineBankingApplication.class, args);
}
}
@Override
public void onApplicationEvent(@NotNull ApplicationReadyEvent event) {
bankInitService.initConfigData();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* All rights are reserved.
*/

package com.adorsys.webank.obs.resource.mockbank;
package com.adorsys.webank.mockbank;

@org.springframework.context.annotation.Configuration
public class Config {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* All rights are reserved.
*/

package com.adorsys.webank.obs.resource.mockbank;
package com.adorsys.webank.mockbank;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
Expand Down
27 changes: 14 additions & 13 deletions online-banking-app/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# Server configuration
server.port=8080
# H2 Database Configuration
spring.h2.console.enabled=true
spring.datasource.url=jdbc:h2:mem:testdb

# H2 Database settings
spring.h2.console.enabled=true
spring.h2.console.path=/h2-console # Path to access the H2 console
spring.datasource.url=jdbc:h2:mem:testdb # In-memory database URL
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.username=sa # Default username
spring.datasource.password= # Default password (empty)
# Swagger Configuration
springdoc.api-docs.path=/api-docs
springdoc.swagger-ui.path=/swagger-ui.html

# Swagger settings
springfox.documentation.enabled=true
springfox.documentation.swagger.v2.path=/api-docs
springdoc.swagger-ui.path=/swagger-ui.html
# Additional Settings (if needed)
spring.datasource.driver-class-name=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=

# Hibernate DDL auto (update, create-drop, validate, etc.)
spring.jpa.hibernate.ddl-auto=update
spring.cloud.compatibility-verifier.enabled=false
Loading