mirror of
https://github.com/moparisthebest/JdbcMapper
synced 2024-12-02 21:52:21 -05:00
45 lines
1.9 KiB
Plaintext
45 lines
1.9 KiB
Plaintext
Beehive Controls + Spring Framework Sample
|
|
==========================================
|
|
|
|
This sample directory contains examples of integrating Beehive Controls with the Spring Framework.
|
|
It uses the bean definition, instantiation, and configuration services of Spring to use JavaBeans
|
|
that have been authored as Controls.
|
|
|
|
Directories
|
|
===========
|
|
|
|
* external/ - contains the Spring jar file used by the sample. This is the full Spring jar from
|
|
the 1.1.5 distribution. This sample has also been tested with the 1.2 Spring JAR.
|
|
|
|
* src-spring-integration/ - contains the implementation of the ControlFactory SPI interface for controls, that
|
|
will use Spring to instantiate and configure Controls.
|
|
|
|
* src/ and web/ - sample webapp that uses Spring and Controls together. The sample includes a basic Control type
|
|
with properties modeling a Person that can nested children, two corresponding implementations (AdultImpl/MinorImpl),
|
|
and provides a sample Spring bean definition (application.xml) and web application (web.xml) configuration files
|
|
that show how configure Spring/Controls to be used together. A simple JSP page (familyTree.jsp) demonstrates
|
|
how the defined beans can be instantiated and used.
|
|
|
|
Building
|
|
========
|
|
|
|
The Spring integration jar can be built using the following commands
|
|
from the samples/controls-spring directory:
|
|
|
|
ant build.spring-integration
|
|
|
|
The sample webapp can be built and deployed to Tomcat using the following
|
|
commands from the samples/controls-spring directory:
|
|
|
|
ant build
|
|
ant war
|
|
cp springControls.war $CATALINA_HOME/webapps
|
|
|
|
Once deployed, the demo JSP page can be accessed at:
|
|
|
|
/springControls/familyTree.jsp
|
|
|
|
This JSP will show a tree of people that is configured using the applicationContext.xml file
|
|
stored in web/WEB-INF. This tree is generated by walking down the PersonBean types that
|
|
are declared in the Spring config file.
|