-
Notifications
You must be signed in to change notification settings - Fork 16
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
HLM-5117 Plan service Changes #734
Changes from all commits
9d0610d
7173370
1d7b717
c9f2f27
b60ed42
9d6333a
a770b28
cabe7dc
c69a505
5d555f1
d40e262
8f644bb
face0ab
93ef7b4
547d1a7
2c11b36
2d149ea
fc80c8e
07054e5
242af62
c44db87
c7dcc1e
b2668c4
8aca49a
27acced
b433c44
e1d9925
0107f27
136b212
75e7cf0
9deb13d
c57fde7
5b819ce
66dba87
00f7a87
51058f8
d46760a
b05bf7e
925306d
600b7e5
1f1bc09
52572ed
65175c1
ebeecf2
2fbbcac
af176d0
ca0710e
7577524
3839c45
c2c881b
df2ac46
95ed775
60e1dc3
8289220
f8be869
c64b14f
6b9a2ab
659a660
49b0f3f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
FROM egovio/amazoncorretto:17-alpine3.19 AS build | ||
# FROM egovio/alpine-maven-builder-jdk-8:1-master-NA-6036091e AS build | ||
#FROM ghcr.io/egovernments/alpine-maven-builder-jdk-8:1-master-na-6036091e AS build | ||
ARG WORK_DIR | ||
WORKDIR /app | ||
|
||
# Install Maven | ||
RUN apk add --no-cache maven | ||
|
||
# copy the project files | ||
COPY ${WORK_DIR}/pom.xml ./pom.xml | ||
COPY build/maven/start.sh ./start.sh | ||
|
||
# not useful for stateless builds | ||
# RUN mvn -B dependency:go-offline | ||
|
||
COPY ${WORK_DIR}/src ./src | ||
RUN mvn -B -f /app/pom.xml package | ||
|
||
|
||
# Create runtime image | ||
#FROM egovio/8-openjdk-alpine | ||
#FROM ghcr.io/egovernments/8-openjdk-alpine:latest | ||
FROM egovio/amazoncorretto:17-alpine3.19 | ||
|
||
|
||
WORKDIR /opt/egov | ||
|
||
COPY --from=build /app/target/*.jar /app/start.sh /opt/egov/ | ||
|
||
RUN chmod +x /opt/egov/start.sh | ||
|
||
CMD ["/opt/egov/start.sh"] |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,18 @@ | ||||||
# Swagger generated server | ||||||
|
||||||
Spring Boot Server | ||||||
|
||||||
|
||||||
## Overview | ||||||
This server was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. | ||||||
By using the [OpenAPI-Spec](https://github.com/swagger-api/swagger-core), you can easily generate a server stub. | ||||||
This is an example of building a swagger-enabled server in Java using the SpringBoot framework. | ||||||
|
||||||
The underlying library integrating swagger to SpringBoot is [springfox](https://github.com/springfox/springfox) | ||||||
|
||||||
Start your server as an simple java application | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use "a" instead of "an". - Start your server as an simple java application
+ Start your server as a simple java application Committable suggestion
Suggested change
|
||||||
|
||||||
You can view the api documentation in swagger-ui by pointing to | ||||||
http://localhost:8080/ | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add "the" before "default port value". - Change default port value in application.properties
+ Change the default port value in application.properties Committable suggestion
Suggested change
|
||||||
|
||||||
Change default port value in application.properties |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
<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/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>org.egov</groupId> | ||
<artifactId>plan-service</artifactId> | ||
<packaging>jar</packaging> | ||
<name>plan-service</name> | ||
<version>1.0.0</version> | ||
<properties> | ||
<java.version>17</java.version> | ||
<maven.compiler.source>${java.version}</maven.compiler.source> | ||
<maven.compiler.target>${java.version}</maven.compiler.target> | ||
</properties> | ||
<parent> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-parent</artifactId> | ||
<version>3.2.2</version> | ||
</parent> | ||
<build> | ||
<sourceDirectory>src/main/java</sourceDirectory> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-maven-plugin</artifactId> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-web</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-jdbc</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.flywaydb</groupId> | ||
<artifactId>flyway-core</artifactId> | ||
<version>9.22.3</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.postgresql</groupId> | ||
<artifactId>postgresql</artifactId> | ||
<version>42.7.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-test</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-validation</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.swagger</groupId> | ||
<artifactId>swagger-core</artifactId> | ||
<version>1.5.18</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.swagger.core.v3</groupId> | ||
<artifactId>swagger-annotations</artifactId> | ||
<version>2.2.8</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.egov.services</groupId> | ||
<artifactId>tracer</artifactId> | ||
<version>2.9.0-SNAPSHOT</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.egov</groupId> | ||
<artifactId>mdms-client</artifactId> | ||
<version>2.9.0-SNAPSHOT</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.projectlombok</groupId> | ||
<artifactId>lombok</artifactId> | ||
<optional>true</optional> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.fasterxml.jackson.datatype</groupId> | ||
<artifactId>jackson-datatype-jsr310</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
<repositories> | ||
<repository> | ||
<id>repo.egovernments.org</id> | ||
<name>eGov ERP Releases Repository</name> | ||
<url>https://nexus-repo.egovernments.org/nexus/content/repositories/releases/</url> | ||
</repository> | ||
<repository> | ||
<id>repo.egovernments.org.snapshots</id> | ||
<name>eGov ERP Releases Repository</name> | ||
<url>https://nexus-repo.egovernments.org/nexus/content/repositories/snapshots/</url> | ||
</repository> | ||
<repository> | ||
<id>repo.egovernments.org.public</id> | ||
<name>eGov Public Repository Group</name> | ||
<url>https://nexus-repo.egovernments.org/nexus/content/groups/public/</url> | ||
</repository> | ||
<repository> | ||
<id>repo.digit.org</id> | ||
<name>eGov DIGIT Releases Repository</name> | ||
<url>https://nexus-repo.digit.org/nexus/content/repositories/snapshots/</url> | ||
</repository> | ||
</repositories> | ||
</project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package digit; | ||
|
||
|
||
import org.egov.tracer.config.TracerConfiguration; | ||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
import org.springframework.context.annotation.ComponentScan; | ||
import org.springframework.context.annotation.Import; | ||
|
||
@Import({ TracerConfiguration.class }) | ||
@SpringBootApplication | ||
@ComponentScan(basePackages = { "digit", "digit.web.controllers" , "digit.config"}) | ||
public class Main { | ||
|
||
public static void main(String[] args) throws Exception { | ||
SpringApplication.run(Main.class, args); | ||
} | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
package digit.config; | ||
|
||
import com.fasterxml.jackson.databind.ObjectMapper; | ||
import lombok.*; | ||
import org.egov.tracer.config.TracerConfiguration; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Import; | ||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; | ||
import org.springframework.stereotype.Component; | ||
|
||
import java.util.TimeZone; | ||
|
||
@Component | ||
@Data | ||
@Import({TracerConfiguration.class}) | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Setter | ||
@Getter | ||
public class Configuration { | ||
|
||
//Workflow Config | ||
@Value("${egov.workflow.host}") | ||
private String wfHost; | ||
|
||
@Value("${egov.workflow.transition.path}") | ||
private String wfTransitionPath; | ||
|
||
@Value("${egov.workflow.businessservice.search.path}") | ||
private String wfBusinessServiceSearchPath; | ||
|
||
@Value("${egov.workflow.processinstance.search.path}") | ||
private String wfProcessInstanceSearchPath; | ||
|
||
|
||
//MDMS | ||
@Value("${egov.mdms.host}") | ||
private String mdmsHost; | ||
|
||
@Value("${egov.mdms.search.endpoint}") | ||
private String mdmsEndPoint; | ||
|
||
|
||
//Persister Topic | ||
@Value("${plan.configuration.create.topic}") | ||
private String planConfigCreateTopic; | ||
|
||
@Value("${plan.configuration.update.topic}") | ||
private String planConfigUpdateTopic; | ||
|
||
@Value("${plan.default.offset}") | ||
private Integer defaultOffset; | ||
|
||
@Value("${plan.default.limit}") | ||
private Integer defaultLimit; | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package digit.config; | ||
|
||
import jakarta.annotation.PostConstruct; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Import; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.http.MediaType; | ||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; | ||
import java.util.TimeZone; | ||
import com.fasterxml.jackson.databind.DeserializationFeature; | ||
import com.fasterxml.jackson.databind.ObjectMapper; | ||
import org.egov.tracer.config.TracerConfiguration; | ||
import org.springframework.jdbc.core.SingleColumnRowMapper; | ||
|
||
|
||
@Import({TracerConfiguration.class}) | ||
public class MainConfiguration { | ||
|
||
@Value("${app.timezone}") | ||
private String timeZone; | ||
|
||
@PostConstruct | ||
public void initialize() { | ||
TimeZone.setDefault(TimeZone.getTimeZone(timeZone)); | ||
} | ||
|
||
@Bean | ||
public ObjectMapper objectMapper(){ | ||
return new ObjectMapper().disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES).setTimeZone(TimeZone.getTimeZone(timeZone)); | ||
} | ||
|
||
@Bean | ||
@Autowired | ||
public MappingJackson2HttpMessageConverter jacksonConverter(ObjectMapper objectMapper) { | ||
MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter(); | ||
converter.setObjectMapper(objectMapper); | ||
return converter; | ||
} | ||
|
||
@Bean | ||
public SingleColumnRowMapper singleColumnRowMapper() { | ||
return new SingleColumnRowMapper<>(String.class); | ||
} | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the unpaired symbol.
Committable suggestion