mirror of
https://github.com/internetarchive/heritrix3.git
synced 2026-09-24 06:36:12 +00:00
Replace Spring's removed @Required annotation with our own
Spring 6 removed @Required and they suggest using constructor injection instead. If we switched our beans to that we'd break existing Heritrix crawl configs. So this change implements our own basic version so we still get errors when a @Required property is null.
This commit is contained in:
@@ -29,10 +29,10 @@ import javax.script.ScriptException;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.archive.io.ReadSource;
|
||||
import org.archive.spring.Required;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.BeanInitializationException;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.beans.factory.annotation.Required;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
|
||||
|
||||
@@ -30,10 +30,10 @@ import javax.script.ScriptException;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.archive.io.ReadSource;
|
||||
import org.archive.modules.CrawlURI;
|
||||
import org.archive.spring.Required;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.BeanInitializationException;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.beans.factory.annotation.Required;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
|
||||
|
||||
+1
-1
@@ -23,8 +23,8 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.archive.modules.CrawlURI;
|
||||
import org.archive.spring.Required;
|
||||
import org.archive.util.SurtPrefixSet;
|
||||
import org.springframework.beans.factory.annotation.Required;
|
||||
|
||||
/**
|
||||
* Rule applies the configured decision for any URI which has a 'via' whose
|
||||
|
||||
@@ -36,12 +36,12 @@ import org.archive.modules.CrawlURI;
|
||||
import org.archive.modules.SchedulingConstants;
|
||||
import org.archive.net.UURI;
|
||||
import org.archive.net.UURIFactory;
|
||||
import org.archive.spring.Required;
|
||||
import org.archive.spring.WriteTarget;
|
||||
import org.archive.util.ArchiveUtils;
|
||||
import org.archive.util.DevUtils;
|
||||
import org.archive.util.iterator.LineReadingIterator;
|
||||
import org.archive.util.iterator.RegexLineIterator;
|
||||
import org.springframework.beans.factory.annotation.Required;
|
||||
|
||||
/**
|
||||
* Module that announces a list of seeds from a text source (such
|
||||
|
||||
Reference in New Issue
Block a user