我正在尝试为WebStorm中的@Configuration
@EnableBatchProcessing
public class BatchMqListener {
// private final Logger logger = LoggerFactory.getLogger(ImportJobConfig.class);
@Autowired
JobBuilderFactory jobBuilderFactory;
@Autowired
StepBuilderFactory stepBuilderFactory;
@Autowired
RabbitTemplate rabbitTemplate;
@Bean
public Job importJob() {
return jobBuilderFactory.get("importJob")
.listener(new JobExecutionListener() {
@Override
public void beforeJob(JobExecution jobExecution) {
// logger.info("Ready to start the job");
System.out.println("Ready to start the job");
}
@Override
public void afterJob(JobExecution jobExecution) {
// logger.info("Job successfully executed.");
System.out.println("Job successfully executed.");
}
})
.incrementer(new RunIdIncrementer())
.flow(stepBuilderFactory.get("importStep")
.<VehicleEvent, VehicleEvent>chunk(2)
.reader(new AmqpItemReader<>(rabbitTemplate))
.listener(new QueueListener<VehicleEvent>())
.processor(customProcessor())
.writer(writer())
.build())
.end()
.build();
}
public ItemProcessor<VehicleEvent, VehicleEvent> customProcessor(){
return null;
}
@Bean
public FlatFileItemWriter<VehicleEvent> writer() {
// log.info("writer called");
FlatFileItemWriter<VehicleEvent> writer = new FlatFileItemWriter<>();
writer.setResource(new FileSystemResource("output/item.all.csv"));
writer.setAppendAllowed(true);
writer.setLineAggregator(new DelimitedLineAggregator<VehicleEvent>() {{
setDelimiter(",");
setFieldExtractor(new BeanWrapperFieldExtractor<VehicleEvent>() {{
setNames(new String[]{"id", "itemName"});
}});
}});
return writer;
}
}
组件创建实时模板:
Route
问题是它如此完成:
我不想向<Route exact path="$PATH$" component={$COMPONENT$}/>$END$
提供任何“定义”。我只想让它看起来像:
exact
我尝试过几种不同的方法来逃避它,我目前无法找到有关此from JetBrains的任何信息。
如何为此类内容创建实时模板?