#BAEL-3176: add "spring" Profile

This commit is contained in:
h_sharifi 2022-10-12 13:42:37 +03:30
parent 7cffc487ea
commit f910b8ac9a
3 changed files with 6 additions and 0 deletions

View File

@ -8,7 +8,9 @@ import org.springframework.batch.core.JobParameters;
import org.springframework.batch.core.JobParametersBuilder;
import org.springframework.batch.core.launch.JobLauncher;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Profile;
@Profile("spring")
public class App {
private static final Logger LOGGER = LoggerFactory.getLogger(App.class);

View File

@ -23,12 +23,14 @@ import org.springframework.beans.factory.annotation.Autowired;
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.Profile;
import org.springframework.core.io.Resource;
import org.springframework.oxm.Marshaller;
import org.springframework.oxm.jaxb.Jaxb2Marshaller;
import java.text.ParseException;
@Profile("spring")
public class SpringBatchConfig {
@Autowired
private JobBuilderFactory jobBuilderFactory;

View File

@ -13,6 +13,7 @@ import org.springframework.batch.support.transaction.ResourcelessTransactionMana
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.core.io.Resource;
import org.springframework.jdbc.datasource.DriverManagerDataSource;
import org.springframework.jdbc.datasource.init.DataSourceInitializer;
@ -21,6 +22,7 @@ import org.springframework.transaction.PlatformTransactionManager;
@Configuration
@EnableBatchProcessing
@Profile("spring")
public class SpringConfig {
@Value("org/springframework/batch/core/schema-drop-sqlite.sql")