See the complete Spring framework documentation for more generation information. One reason that Spring was selected for the Kuali architecture was its support for delivering flexible and configurable applications.
- Create your new Spring XML file within the project source directory (
You may want to follow the package and file naming conventions used in the delivered code. If you are adding functionality to the core application or an existing module or you are overriding a delivered bean definition, start by locating the appropriate file.
SpringBeans.xmlin the root of the project defines the data source, configures transaction management and caching, and configures Rice.
org.kuali.kfs.KualiSpringBeansKfs.xmlconfigures other application-level beans. And, the Spring files that contain the beans for each module follow the pattern:
org.kuali.module.*.KualiSpringBeans*.xml. Once you've located the file, name your file similarly. For example, if you are overriding a bean defined by the chart module, create a file named
edu.sampleu.kuali.module.chartpackage. If you are adding a module, create a file called
SampleuSpringBeans<your module name>.xmlin a
edu.sampleu.kuali.module.<your module name>package.
- Add the appropriate beans to your new file.
When overriding a delivered bean, you must use the same id. Given that and the fact that you may well want to keep many properties the same, you will probably want to start by copying in the definition of the bean that you want to override. For example, if you want to overriding the
webAuthenticationServicebean defined in
- Create the new Java class, e.g.
When overriding a delivered bean and changing the class, your class must implement the same interfaces that the class specified by the delivered bean implements.
- Override the
spring.source.filesconfiguration property, and add the path to your new Spring file to the end of the list.
See the build properties overview for details. You must put your Spring bean configuration files at the end of the list. The last bean definition with a given id will be used by the application.