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

Grad Release 1.6.0 #433

Merged
merged 38 commits into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
8ccf4d6
Merge branch 'main' of https://github.com/bcgov/EDUC-GRAD-BATCH-GRADU…
arybakov-cgi Aug 22, 2023
4c06b42
GRAD2-2004 - If a User selects USER in the Where dropdown opion off o…
arybakov-cgi Aug 22, 2023
1f874fd
GRAD2-2004 - If a User selects USER in the Where dropdown opion off o…
arybakov-cgi Aug 22, 2023
a329ab2
GRAD2-2295: task is completed.
infstar Aug 24, 2023
52a7d26
GRAD2-1951 Upgrade GRAD-BATCH-GRADUATION-API to Java 18 - Spring Boot…
arybakov-cgi Aug 29, 2023
3da2d9e
GRAD2-1951 Upgrade GRAD-BATCH-GRADUATION-API to Java 18 - Spring Boot…
arybakov-cgi Aug 30, 2023
6b6574e
GRAD2-1951 Upgrade GRAD-BATCH-GRADUATION-API to Java 18 - Spring Boot…
arybakov-cgi Aug 30, 2023
7607cbe
Merge branch 'grad-release' of https://github.com/bcgov/EDUC-GRAD-BAT…
arybakov-cgi Aug 30, 2023
9db11a3
GRAD2-1951 Upgrade GRAD-BATCH-GRADUATION-API to Java 18 - Spring Boot…
arybakov-cgi Aug 30, 2023
e6fe45d
GRAD2-1951 Upgrade GRAD-BATCH-GRADUATION-API to Java 18 - Spring Boot…
arybakov-cgi Aug 31, 2023
860071f
GRAD2-1951 Upgrade GRAD-BATCH-GRADUATION-API to Java 18 - Spring Boot…
arybakov-cgi Sep 1, 2023
1c71877
GRAD2-1951 Upgrade GRAD-BATCH-GRADUATION-API to Java 18 - Spring Boot…
arybakov-cgi Sep 1, 2023
ef4c9cd
GRAD2-1951 Upgrade GRAD-BATCH-GRADUATION-API to Java 18 - Spring Boot…
arybakov-cgi Sep 1, 2023
1fdae24
Merge branch 'grad-release' of https://github.com/bcgov/EDUC-GRAD-BAT…
arybakov-cgi Sep 1, 2023
38f64d4
Fix code smells
arybakov-cgi Sep 1, 2023
f207d4f
Merge pull request #425 from bcgov/feature/GRAD2-2295
kamal-mohammed Sep 6, 2023
90e5fd9
Fix LocalDate issues
arybakov-cgi Sep 6, 2023
ca006eb
Merge pull request #424 from bcgov/develop/alex-GRAD2-2004
kamal-mohammed Sep 6, 2023
0ba0e63
Merge branch 'grad-release' of https://github.com/bcgov/EDUC-GRAD-BAT…
arybakov-cgi Sep 7, 2023
f618bfe
Remove unused date/time settings
arybakov-cgi Sep 7, 2023
f519724
Merge pull request #427 from bcgov/develop/alex-GRAD2-1951
kamal-mohammed Sep 11, 2023
c3136f0
GRAD2-2308 - HD-21581-GRAD - P3 - GRAD Batch Processing - Select Stud…
arybakov-cgi Sep 13, 2023
0a003da
Merge pull request #428 from bcgov/develop/alex-GRAD2-2308
kamal-mohammed Sep 15, 2023
f3b4454
GRAD2-2312
arybakov-cgi Sep 15, 2023
8284911
Revert "GRAD2-2295: task is completed."
kamal-mohammed Sep 15, 2023
8aa3804
GRAD2-2295 revert related changes
kamal-mohammed Sep 15, 2023
700c6c3
Merge pull request #430 from bcgov/revert-425-feature/GRAD2-2295
kamal-mohammed Sep 15, 2023
ea6df35
Revert "GRAD2-2308 - HD-21581-GRAD - P3 - GRAD Batch Processing - Sel…
kamal-mohammed Sep 18, 2023
82def36
Merge branch 'grad-release' of https://github.com/bcgov/EDUC-GRAD-BAT…
arybakov-cgi Sep 18, 2023
abea48c
Merge pull request #431 from bcgov/revert-428-develop/alex-GRAD2-2308
kamal-mohammed Sep 18, 2023
5183c03
GRAD2-2312
arybakov-cgi Sep 18, 2023
21f0262
GRAD2-2312
arybakov-cgi Sep 18, 2023
63d3e25
GRAD2-2312
arybakov-cgi Sep 19, 2023
495904f
GRAD2-2312
arybakov-cgi Sep 19, 2023
933de57
GRAD2-2312
arybakov-cgi Sep 19, 2023
0844fb1
GRAD2-2312
arybakov-cgi Sep 19, 2023
f2bf807
Merge pull request #432 from bcgov/develop/alex-GRAD2-2312
kamal-mohammed Sep 19, 2023
ac5e32c
Update pom.xml
kamal-mohammed Sep 19, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/on.pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 11
- name: Set up JDK 18
uses: actions/setup-java@v1
with:
java-version: 18
Expand Down
30 changes: 11 additions & 19 deletions api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>ca.bc.gov.educ</groupId>
<artifactId>educ-grad-batch-graduation-api</artifactId>
<version>1.8.47</version>
<version>1.8.48</version>
<name>educ-grad-batch-graduation-api</name>
<description>Ministry of Education GRAD BATCH GRADUATION API</description>

Expand All @@ -27,6 +27,7 @@
src/main/java/ca/bc/gov/educ/api/batchgraduation/processor/**,
src/main/java/ca/bc/gov/educ/api/batchgraduation/reader/**,
src/main/java/ca/bc/gov/educ/api/batchgraduation/writer/**,
src/main/java/org/springframework/**,
src/test/java/ca/bc/gov/educ/api/batchgraduation/**
</sonar.exclusions>
<sonar.coverage.exclusions>
Expand All @@ -41,14 +42,15 @@
src/main/java/ca/bc/gov/educ/api/batchgraduation/processor/**,
src/main/java/ca/bc/gov/educ/api/batchgraduation/reader/**,
src/main/java/ca/bc/gov/educ/api/batchgraduation/writer/**,
src/main/java/org/springframework/**,
src/test/java/ca/bc/gov/educ/api/batchgraduation/**
</sonar.coverage.exclusions>
<java.version>18</java.version>
<maven.compiler.version>3.10.1</maven.compiler.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<org.mapstruct.version>1.3.1.Final</org.mapstruct.version>
<springdoc.version>1.6.9</springdoc.version>
<springdoc.version>2.0.2</springdoc.version>
<log4j.version>2.18.0</log4j.version>
<resilience4j.version>2.0.2</resilience4j.version>
<shedlock.version>4.38.0</shedlock.version>
Expand All @@ -57,7 +59,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.1</version>
<version>3.0.2</version>
</parent>

<dependencies>
Expand Down Expand Up @@ -97,19 +99,10 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>5.7.5</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>javax.persistence-api</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
Expand Down Expand Up @@ -145,7 +138,11 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>

<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<version>8.0.0.Final</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
Expand All @@ -157,12 +154,7 @@
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-webmvc-core</artifactId>
<version>${springdoc.version}</version>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>${springdoc.version}</version>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,35 +1,45 @@
package ca.bc.gov.educ.api.batchgraduation.config;

import org.springframework.batch.core.configuration.annotation.DefaultBatchConfigurer;
import org.springframework.batch.core.launch.JobLauncher;
import org.springframework.batch.core.launch.support.SimpleJobLauncher;
import org.springframework.batch.core.launch.support.TaskExecutorJobLauncher;
import org.springframework.batch.core.repository.JobRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.core.task.SimpleAsyncTaskExecutor;
import org.springframework.core.task.SyncTaskExecutor;
import org.springframework.stereotype.Component;
import org.springframework.transaction.TransactionManager;

import javax.sql.DataSource;

@Configuration
@Profile("!test")
@Component
public class BatchConfig extends DefaultBatchConfigurer {
public class BatchConfig {

@Autowired
public BatchConfig(@Qualifier("batchDataSource") DataSource batchDataSource) {
super(batchDataSource);
}
DataSource dataSource;

@Autowired
TransactionManager transactionManager;

@Bean(name = "asyncJobLauncher")
public JobLauncher asyncJobLauncher(JobRepository jobRepository) throws Exception {
SimpleJobLauncher jobLauncher = new SimpleJobLauncher();
TaskExecutorJobLauncher jobLauncher = new TaskExecutorJobLauncher();
jobLauncher.setJobRepository(jobRepository);
jobLauncher.setTaskExecutor(new SimpleAsyncTaskExecutor());
jobLauncher.afterPropertiesSet();
return jobLauncher;
}

@Bean(name = "jobLauncher")
public JobLauncher jobLauncher(JobRepository jobRepository) throws Exception {
TaskExecutorJobLauncher jobLauncher = new TaskExecutorJobLauncher();
jobLauncher.setJobRepository(jobRepository);
jobLauncher.setTaskExecutor(new SyncTaskExecutor());
jobLauncher.afterPropertiesSet();
return jobLauncher;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
Expand Down Expand Up @@ -62,7 +63,8 @@ public class BatchDbConfig {

@Primary
@Bean
public DataSource batchDataSource() {
@Qualifier("datasource")
public DataSource dataSource() {
HikariConfig config = new HikariConfig();

config.setDriverClassName(driverClassName);
Expand All @@ -88,14 +90,14 @@ public DataSource batchDataSource() {
public LocalContainerEntityManagerFactoryBean batchEntityManager() {
LocalContainerEntityManagerFactoryBean em
= new LocalContainerEntityManagerFactoryBean();
em.setDataSource(batchDataSource());
em.setDataSource(dataSource());
em.setPackagesToScan("ca.bc.gov.educ.api.batchgraduation.entity");

HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
em.setJpaVendorAdapter(vendorAdapter);
HashMap<String, Object> properties = new HashMap<>();
properties.put("hibernate.hbm2ddl.auto", "none");
properties.put("hibernate.dialect", "org.hibernate.dialect.Oracle12cDialect");
properties.put("hibernate.dialect", "org.hibernate.dialect.OracleDialect");
properties.put("hibernate.format_sql", "true");
properties.put("hibernate.show_sql", "false");
em.setJpaPropertyMap(properties);
Expand All @@ -107,7 +109,8 @@ public LocalContainerEntityManagerFactoryBean batchEntityManager() {

@Primary
@Bean
public PlatformTransactionManager batchTransactionManager() {
@Qualifier("batchTransactionManager")
public PlatformTransactionManager transactionManager() {
JpaTransactionManager transactionManager = new JpaTransactionManager();
transactionManager.setEntityManagerFactory(batchEntityManager().getObject());
return transactionManager;
Expand Down
Loading
Loading