mirror of
https://github.com/apache/struts.git
synced 2026-08-11 01:27:14 +00:00
Uses the new interface to init bean on the beginning
This commit is contained in:
+3
-1
@@ -15,10 +15,12 @@
|
||||
*/
|
||||
package com.opensymphony.xwork2.conversion;
|
||||
|
||||
import com.opensymphony.xwork2.inject.Initializable;
|
||||
|
||||
/**
|
||||
* Used to read converters from Properties file
|
||||
*/
|
||||
public interface ConversionPropertiesProcessor {
|
||||
public interface ConversionPropertiesProcessor extends Initializable {
|
||||
|
||||
/**
|
||||
* Process given property to load converters as not required (Properties file doesn't have to exist)
|
||||
|
||||
+7
@@ -48,6 +48,13 @@ public class DefaultConversionPropertiesProcessor implements ConversionPropertie
|
||||
this.converterHolder = converterHolder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
LOG.debug("Processing default conversion properties files");
|
||||
processRequired("struts-default-conversion.properties");
|
||||
process("xwork-conversion.properties");
|
||||
}
|
||||
|
||||
public void process(String propsName) {
|
||||
loadConversionProperties(propsName, false);
|
||||
}
|
||||
|
||||
@@ -171,12 +171,6 @@ public class XWorkConverter extends DefaultTypeConverter {
|
||||
this.reloadingConfigs = Boolean.parseBoolean(reloadingConfigs);
|
||||
}
|
||||
|
||||
@Inject
|
||||
public void setConversionPropertiesProcessor(ConversionPropertiesProcessor propertiesProcessor) {
|
||||
propertiesProcessor.processRequired("struts-default-conversion.properties");
|
||||
propertiesProcessor.process("xwork-conversion.properties");
|
||||
}
|
||||
|
||||
@Inject
|
||||
public void setConversionFileProcessor(ConversionFileProcessor fileProcessor) {
|
||||
this.fileProcessor = fileProcessor;
|
||||
|
||||
Reference in New Issue
Block a user