Skip to content

Commit

Permalink
Merge branch 'feature/version/upgrade' into testing-vulnerability
Browse files Browse the repository at this point in the history
  • Loading branch information
ravishanigarapu authored Feb 15, 2024
2 parents ef3e26e + 122e6a4 commit 55b06d1
Show file tree
Hide file tree
Showing 11 changed files with 430 additions and 428 deletions.
14 changes: 12 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.2.2</version>

<relativePath />
</parent>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<java.version>17.0.3</java.version>
<org.springframework.boot.version>3.2.2</org.springframework.boot.version>

<org.springframework.hateoas.version>0.10.0.RELEASE</org.springframework.hateoas.version>
<m2e.apt.activation>jdt_apt</m2e.apt.activation>
<org.mapstruct.version>1.2.0.Final</org.mapstruct.version>
Expand Down Expand Up @@ -159,6 +162,12 @@
<artifactId>jackson-datatype-joda</artifactId>
<version>2.4.0</version>
</dependency>

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

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-cache</artifactId>
Expand Down Expand Up @@ -223,6 +232,7 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>

<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>junit</groupId>
Expand All @@ -233,7 +243,7 @@
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
</dependency>

</dependencies>
<build>
<finalName>Inventoryapi-v1.0</finalName>
Expand Down Expand Up @@ -340,4 +350,4 @@
</plugin>
</plugins>
</reporting>
</project>
</project>
41 changes: 41 additions & 0 deletions src/main/java/com/iemr/inventory/config/HttpInterceptorConfig.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* AMRIT – Accessible Medical Records via Integrated Technology
* Integrated EHR (Electronic Health Records) Solution
*
* Copyright (C) "Piramal Swasthya Management and Research Institute"
*
* This file is part of AMRIT.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
package com.iemr.inventory.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import com.iemr.inventory.utils.http.HTTPRequestInterceptor;

@Configuration
public class HttpInterceptorConfig implements WebMvcConfigurer {

@Autowired
private HTTPRequestInterceptor httpInterceptor;

@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(httpInterceptor);
}
}
66 changes: 0 additions & 66 deletions src/main/java/com/iemr/inventory/config/InterceptorConfig.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
* AMRIT – Accessible Medical Records via Integrated Technology
* Integrated EHR (Electronic Health Records) Solution
* AMRIT – Accessible Medical Records via Integrated Technology
* Integrated EHR (Electronic Health Records) Solution
*
* Copyright (C) "Piramal Swasthya Management and Research Institute"
* Copyright (C) "Piramal Swasthya Management and Research Institute"
*
* This file is part of AMRIT.
*
Expand All @@ -19,7 +19,22 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
package com.iemr.inventory.utils.redis;
package com.iemr.inventory.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;

@Configuration
public class RedisConfig {

private @Value("${spring.data.redis.host}") String redisHost;
private @Value("${spring.data.redis.port}") int redisPort;

@Bean
LettuceConnectionFactory lettuceConnectionFactory() {
return new LettuceConnectionFactory(redisHost, redisPort);
}

public class RedisConnection {
}
24 changes: 0 additions & 24 deletions src/main/java/com/iemr/inventory/utils/IEMRApplBeans.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,14 @@
*/
package com.iemr.inventory.utils;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.mail.javamail.JavaMailSenderImpl;

import com.iemr.inventory.utils.config.ConfigProperties;
import com.iemr.inventory.utils.gateway.email.EmailService;
import com.iemr.inventory.utils.gateway.email.GenericEmailServiceImpl;
import com.iemr.inventory.utils.redis.RedisStorage;
import com.iemr.inventory.utils.sessionobject.SessionObject;
import com.iemr.inventory.utils.validator.Validator;

@Configuration
public class IEMRApplBeans {
Expand All @@ -54,24 +49,5 @@ public ConfigProperties configProperties() {
return new ConfigProperties();
}

@Bean
public SessionObject sessionObject() {
return new SessionObject();
}

@Bean
public RedisStorage redisStorage() {
return new RedisStorage();
}

private @Value("${spring.data.redis.host}") String redisHost;
private @Value("${spring.data.redis.port}") int redisPort;

@Bean
public LettuceConnectionFactory connectionFactory() {
System.out.print("Connecting to Redis " + redisHost + ":" + redisPort);

return new LettuceConnectionFactory(redisHost, redisPort);
}

}
Loading

0 comments on commit 55b06d1

Please sign in to comment.