1 /*
2 * Copyright 2006-2007 the original author or authors.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 package org.springframework.batch.core.configuration.support;
18
19 import org.springframework.context.ApplicationContext;
20 import org.springframework.core.io.Resource;
21
22 /**
23 * {@link ApplicationContextFactory} implementation that takes a parent context
24 * and a path to the context to create. When createApplicationContext method is
25 * called, the child {@link ApplicationContext} will be returned. The child
26 * context is not re-created every time it is requested, it is lazily
27 * initialized and cached. Clients should ensure that it is closed when it is no
28 * longer needed. If a path is not set, the parent will always be returned.
29 *
30 * @deprecated use {@link GenericApplicationContextFactory} instead
31 */
32 public class ClassPathXmlApplicationContextFactory extends GenericApplicationContextFactory {
33
34 /**
35 * Create an application context factory for the resource specified.
36 *
37 * @param resource a resource (XML configuration file)
38 */
39 public ClassPathXmlApplicationContextFactory(Resource resource) {
40 super(resource);
41 }
42
43 }