Last change
on this file was
68,
checked in by cbipsl, 14 years ago
|
commit v1 eccad
|
-
Property svn:executable set to
*
|
File size:
761 bytes
|
Line | |
---|
1 | package org.medias.eccad.helpers; |
---|
2 | |
---|
3 | import org.springframework.beans.factory.xml.XmlBeanFactory; |
---|
4 | import org.springframework.core.io.ClassPathResource; |
---|
5 | |
---|
6 | public class SpringBeanFactory { |
---|
7 | private static XmlBeanFactory xmlbean = null; |
---|
8 | |
---|
9 | public static XmlBeanFactory getXmlFactory() { |
---|
10 | if (xmlbean == null) |
---|
11 | xmlbean = new XmlBeanFactory(new ClassPathResource("./eccad_spring.xml")); |
---|
12 | return xmlbean; |
---|
13 | } |
---|
14 | |
---|
15 | public static XmlBeanFactory getXmlFactory(String type) { |
---|
16 | // TODO: faire un truc propre ici ^^ |
---|
17 | if (xmlbean == null) { |
---|
18 | if (type == null || type == "") |
---|
19 | xmlbean = new XmlBeanFactory(new ClassPathResource("./eccad_spring.xml")); |
---|
20 | else |
---|
21 | xmlbean = new XmlBeanFactory(new ClassPathResource("./eccad_spring_test.xml")); |
---|
22 | } |
---|
23 | return xmlbean; |
---|
24 | } |
---|
25 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.