/** * Template method that subclasses may override to construct the object * returned by this factory. The default implementation returns the * plain merged Properties instance. * <p>Invoked on initialization of this FactoryBean in case of a * shared singleton; else, on each {@link #getObject()} call. * @return the object returned by this factory * @throws IOException if an exception occurred during properties loading * @see #mergeProperties() */ protected Properties createProperties() throws IOException { return mergeProperties(); }
/** * Template method that subclasses may override to construct the object * returned by this factory. The default implementation returns the * plain merged Properties instance. * <p>Invoked on initialization of this FactoryBean in case of a * shared singleton; else, on each {@link #getObject()} call. * @return the object returned by this factory * @throws IOException if an exception occurred during properties loading * @see #mergeProperties() */ protected Properties createProperties() throws IOException { return mergeProperties(); }
/** * Template method that subclasses may override to construct the object * returned by this factory. The default implementation returns the * plain merged Properties instance. * <p>Invoked on initialization of this FactoryBean in case of a * shared singleton; else, on each {@link #getObject()} call. * @return the object returned by this factory * @throws IOException if an exception occured during properties loading * @deprecated as of Spring 3.0, in favor of {@link #createProperties()} */ @Deprecated protected Object createInstance() throws IOException { return mergeProperties(); }
/** * Template method that subclasses may override to construct the object * returned by this factory. Default returns the plain merged Properties. * <p>Invoked on initialization of this FactoryBean in case of * a singleton; else, on each <code>getObject()</code> call. * @return the object returned by this factory * @throws IOException if an exception occured during properties loading * @see #getObject() * @see #mergeProperties() */ protected Object createInstance() throws IOException { return mergeProperties(); }
/** * Template method that subclasses may override to construct the object * returned by this factory. The default implementation returns the * plain merged Properties instance. * <p>Invoked on initialization of this FactoryBean in case of a * shared singleton; else, on each {@link #getObject()} call. * @return the object returned by this factory * @throws IOException if an exception occurred during properties loading * @see #mergeProperties() */ protected Properties createProperties() throws IOException { return mergeProperties(); }
@Override protected Properties mergeProperties() throws IOException { Properties properties = super.mergeProperties(); if (servletContext != null) { @SuppressWarnings("rawtypes") Enumeration parameterNames = servletContext.getInitParameterNames(); while (parameterNames.hasMoreElements()) { String name = (String) parameterNames.nextElement(); properties.setProperty(name, servletContext.getInitParameter(name)); } } if (exposedProperties != null) { for (String propertyName : properties.stringPropertyNames()) { if (!exposedProperties.contains(propertyName)) properties.remove(propertyName); } } return properties; }
Properties props = super.mergeProperties();
Properties props = super.mergeProperties();