{"id":13471793,"url":"https://github.com/v5tech/maven-framework-project","last_synced_at":"2025-09-04T02:31:12.249Z","repository":{"id":37286528,"uuid":"6329163","full_name":"v5tech/maven-framework-project","owner":"v5tech","description":"基于maven的多框架和多视图融合技术(Struts1、Struts2、Spring、SpringMVC、Hibernate、Ibatis、MyBatis、Spring Data JPA、DWR)","archived":true,"fork":false,"pushed_at":"2023-01-02T22:01:30.000Z","size":7312,"stargazers_count":210,"open_issues_count":22,"forks_count":174,"subscribers_count":42,"default_branch":"master","last_synced_at":"2025-01-11T12:03:03.105Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://aimeizi.net","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/v5tech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-10-22T03:55:17.000Z","updated_at":"2024-12-24T09:46:35.000Z","dependencies_parsed_at":"2023-02-01T04:17:36.650Z","dependency_job_id":null,"html_url":"https://github.com/v5tech/maven-framework-project","commit_stats":null,"previous_names":["v5tech/maven-framework-project","ameizi/maven-framework-project","sxyx2008/maven-framework-project"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/v5tech/maven-framework-project","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v5tech%2Fmaven-framework-project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v5tech%2Fmaven-framework-project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v5tech%2Fmaven-framework-project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v5tech%2Fmaven-framework-project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/v5tech","download_url":"https://codeload.github.com/v5tech/maven-framework-project/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v5tech%2Fmaven-framework-project/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273541896,"owners_count":25124056,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T16:00:49.308Z","updated_at":"2025-09-04T02:31:11.557Z","avatar_url":"https://github.com/v5tech.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"# maven-framework-project\r\n\r\n### 该项目不再更新维护，请移步[https://github.com/v5developer/maven-framework-project](https://github.com/v5developer/maven-framework-project)\r\n\r\n\r\n* 该项目基于maven3.0构建的，项目中融合了\u003cem\u003eStruts1\u003c/em\u003e、\u003cem\u003eStruts2\u003c/em\u003e、\u003cem\u003eSpring\u003c/em\u003e、\u003cem\u003eSpringMVC\u003c/em\u003e、\u003cem\u003eHibernate\u003c/em\u003e、\u003cem\u003eIbatis\u003c/em\u003e、\u003cem\u003eMyBatis\u003c/em\u003e、\u003cem\u003eSpring Data JPA\u003c/em\u003e、\u003cem\u003eSpring JDBC\u003c/em\u003e、\u003cem\u003eSpring DWR\u003c/em\u003e。页面展现这里使用Struts1、Struts2、SpringMVC（jsp视图、velocity视图、freemarker视图、pdf视图、excel视图、xml视图、json视图等）。是一个综合性的项目。\r\n\r\n* 该项目后期会陆续集成一些好的框架进来比如说Spring Web Flow、Jbpm、WebService、Compass、Solr、nutch等。总之是一个综合性的项目。该项目不处理业务，主要是把目前自己工作中用到过的各种框架糅合到一个项目中。纯粹是一个jee框架的糅合，主要是介绍各种技术。\r\n\r\n* 项目中的持久化框架sql语句的跟踪分别采用\u003cstrong\u003elog4jdbc\u003c/strong\u003e结合\u003cstrong\u003elog4j\u003c/strong\u003e和\u003cstrong\u003ep6spy\u003c/strong\u003e,在控制台可以看到完整的sql语句。\r\n\r\n* 项目中使用阿里Druid数据源\r\n\r\n* 项目中使用Spring Security做权限过滤\r\n\r\n* 项目中使用Twitter的Bootstrap框架做ui\r\n\r\n* 项目中使用Spring WS发布基于契约优先的WebService\r\n\r\n* Spring  JAX-WS请参考\u003cem\u003e[http://jax-ws-commons.java.net/](http://jax-ws-commons.java.net/)\u003c/em\u003e\r\n\r\n* Spring整合dwr时dwr版本很关键,否则报莫名其妙的错误,具体的整合方式参照\u003cem\u003e[http://www.butterdev.com/category/dwr/](http://www.butterdev.com/category/dwr/)\u003c/em\u003e\r\n\r\n# 项目包结构图\r\n![src/main/resources/package.jpg](src/main/resources/package.jpg)\r\n\r\n# 项目中所使用框架版本信息\r\n1. Struts1 1.3.10 参照\u003cem\u003e[spring-struts.xml](src/main/resources/spring-struts.xml)\u003c/em\u003e、\u003cem\u003e[struts-config.xml](src/main/webapp/WEB-INF/struts-config.xml)\u003c/em\u003e、\u003cem\u003e[web.xml](src/main/webapp/WEB-INF/web.xml)\u003c/em\u003e配置\r\n   * \u003cem\u003e[http://localhost:8080/maven-framework/helloWorld.str](http://localhost:8080/maven-framework/helloWorld.str)\u003c/em\u003e\r\n2. Struts2 2.3.8  参照\u003cem\u003e[spring-struts2-servlet.xml](src/main/resources/spring-struts2-servlet.xml)\u003c/em\u003e、\u003cem\u003e[struts.xml](src/main/resources/struts.xml)\u003c/em\u003e、\u003cem\u003e[web.xml](src/main/webapp/WEB-INF/web.xml)\u003c/em\u003e配置\r\n   * \u003cem\u003e[http://localhost:8080/maven-framework/helloAction!hello.action](http://localhost:8080/maven-framework/helloAction!hello.action)\u003c/em\u003e\r\n3. Spring 3.2.1.RELEASE 参照\u003cem\u003e[applicationContext.xml](src/main/resources/applicationContext.xml)\u003c/em\u003e配置\r\n4. Spring JDBC 参照\u003cem\u003e[spring-jdbc.xml](src/main/resources/spring-jdbc.xml)\u003c/em\u003e配置\r\n   * 单元测试[ProducrServiceTest.java](src/test/java/com/fengjing/framework/spring/jdbc/service/impl/ProducrServiceTest.java)\r\n5. Hibernate 4.2.0.Final 参照\u003cem\u003e[spring-hibernate.xml](src/main/resources/spring-hibernate.xml)\u003c/em\u003e配置\r\n   * 单元测试[EmployeeServiceImplTest.java](src/test/java/com/fengjing/framework/hibernate/service/impl/EmployeeServiceImplTest.java)\r\n6. ibatis 2.3.4.726  参照\u003cem\u003e[spring-ibatis.xml](src/main/resources/spring-ibatis.xml)\u003c/em\u003e配置\r\n   * 单元测试[ProductServiceImplTest.java](src/test/java/com/fengjing/framework/ibatis/service/impl/ProductServiceImplTest.java)\r\n7. MyBatis 3.1.1   参照\u003cem\u003e[spring-mybatis.xml](src/main/resources/spring-mybatis.xml)\u003c/em\u003e配置\r\n   * 单元测试[ProducrServiceTest.java](src/test/java/com/fengjing/framework/mybatis/service/impl/ProducrServiceTest.java)\r\n8. Spring Data JPA 1.3.0.RELEASE  参照\u003cem\u003e[spring-data-jpa.xml](src/main/resources/spring-data-jpa.xml)\u003c/em\u003e配置\r\n   * 单元测试[UserServiceImplTest.java](src/test/java/com/fengjing/framework/spring/data/jpa/service/impl/UserServiceImplTest.java)\r\n9. DWR 3.0(该版本jar包在跟Spring整合使用注解方式时会有问题,建议使用项目中的dwr.jar)  参照\u003cem\u003e[spring-mvc-dwr.xml](src/main/resources/spring-mvc-dwr.xml)\u003c/em\u003e、\u003cem\u003e[web.xml](src/main/webapp/WEB-INF/web.xml)\u003c/em\u003e配置\r\n   * dwr测试地址\u003cem\u003e[http://localhost:8080/maven-framework/dwr/index.html](http://localhost:8080/maven-framework/dwr/index.html)\u003c/em\u003e\r\n   * dwr文件上传下载\u003cem\u003e[http://localhost:8080/maven-framework/direct/dwr.do](http://localhost:8080/maven-framework/direct/dwr.do)\u003c/em\u003e\r\n10. Spring Security 3.1.3.RELEASE 参照\u003cem\u003e[spring-security.xml](src/main/resources/spring-security.xml)\u003c/em\u003e配置\r\n11. log4jdbc 1.2 采用log4jdbc跟踪sql语句 查看\u003cem\u003e[log4j.xml](src/main/resources/log4j.xml)\u003c/em\u003e\r\n12. p6spy 1.3 采用p6spy跟踪sql语句 详细查看\u003cem\u003e[spy.properties](src/main/resources/spy.properties)\u003c/em\u003e文件\r\n13. spring rmi远程方法调用 参照\u003cem\u003e[spring-rmi.xml](src/main/resources/spring-rmi.xml)\u003c/em\u003e\r\n\t* 调用\u003cem\u003e[HelloServiceTest.java](src/test/java/com/fengjing/framework/spring/rmi/HelloServiceTest.java)\u003c/em\u003e\r\n14. Spring MVC 参照\u003cem\u003e[spring-mvc-servlet.xml](src/main/resources/spring-mvc-servlet.xml)\u003c/em\u003e、\u003cem\u003e[web.xml](src/main/webapp/WEB-INF/web.xml)\u003c/em\u003e\r\n\t* jsp视图\u003cem\u003e[http://localhost:8080/maven-framework/hello/jsp.do](http://localhost:8080/maven-framework/hello/jsp.do)\u003c/em\u003e\r\n\t* velocity视图\u003cem\u003e[http://localhost:8080/maven-framework/hello/velocity.do](http://localhost:8080/maven-framework/hello/velocity.do)\u003c/em\u003e\r\n\t* freemarker视图\u003cem\u003e[http://localhost:8080/maven-framework/hello/freemarker.do](http://localhost:8080/maven-framework/hello/freemarker.do)\u003c/em\u003e\r\n\t* 基于jxl方式的excel视图\u003cem\u003e[http://localhost:8080/maven-framework/jxl.do?output=excel](http://localhost:8080/maven-framework/jxl.do?output=excel)\u003c/em\u003e\r\n\t* 基于poi方式的excel视图\u003cem\u003e[http://localhost:8080/maven-framework/poi.do?output=excel](http://localhost:8080/maven-framework/poi.do?output=excel)\u003c/em\u003e\r\n\t* 基于itext的pdf视图\u003cem\u003e[http://localhost:8080/maven-framework/itext.do?output=pdf](http://localhost:8080/maven-framework/itext.do?output=pdf)\u003c/em\u003e\r\n\t* rss视图\u003cem\u003e[http://localhost:8080/maven-framework/rss.do](http://localhost:8080/maven-framework/rss.do)\u003c/em\u003e\r\n\t* xml视图\u003cem\u003e[http://localhost:8080/maven-framework/xml.do](http://localhost:8080/maven-framework/xml.do)\u003c/em\u003e\r\n\t* json视图\u003cem\u003e[http://localhost:8080/maven-framework/json.do](http://localhost:8080/maven-framework/json.do)\u003c/em\u003e\r\n\t* log4j视图\u003cem\u003e[http://localhost:8080/maven-framework/log4j.do](http://localhost:8080/maven-framework/log4j.do)\u003c/em\u003e\r\n\t* 基于SimpleUrlHandlerMapping方式的rest方式\u003cem\u003e[http://localhost:8080/maven-framework/simpleurl/showuser/admin/admin.do](http://localhost:8080/maven-framework/simpleurl/showuser/admin/admin.do)\u003c/em\u003e\r\n\t* 基于普通的rest方式\u003cem\u003e[http://localhost:8080/maven-framework/hello/showuser/admin/admin.do](http://localhost:8080/maven-framework/hello/showuser/admin/admin.do)\u003c/em\u003e\r\n\t* 基于rest方式的spring mvc crud详细查看\u003cem\u003e[ContactControll](src/main/java/com/fengjing/framework/springmvc/controller/ContactControll.java)\u003c/em\u003e中的配置\r\n15. Spring Jax WS 参照\u003cem\u003e[spring-jax-ws-servlet.xml](src/main/resources/spring-jax-ws-servlet.xml)、\u003cem\u003e[web.xml](src/main/webapp/WEB-INF/web.xml)\u003c/em\u003e 注意查看[pom](pom.xml)中wsimport的配置\u003c/em\u003e\r\n\t* \u003cem\u003e[http://localhost:8080/maven-framework/service/hello?wsdl](http://localhost:8080/maven-framework/service/hello?wsdl)\u003c/em\u003e\r\n    * 生成客户端访问执行\u003cem\u003emvn jaxws:wsimport\u003c/em\u003e\r\n    * 客户端访问\u003cem\u003e[HelloWebServiceClient](src/main/java/com/fengjing/framework/spring/jax/ws/client/HelloWebServiceClient.java)\u003c/em\u003e\r\n16. CXF集成Spring发布WebService 参照\u003cem\u003e[spring-cxf-servlet.xml](src/main/resources/spring-cxf-servlet.xml)、[web.xml](src/main/webapp/WEB-INF/web.xml)\u003c/em\u003e配置\r\n\t* 访问地址:\u003cem\u003e[http://localhost:8080/maven-framework/ws/HelloWorldService?wsdl](http://localhost:8080/maven-framework/ws/HelloWorldService?wsdl)\u003c/em\u003e\r\n    * 客户端访问:\u003cem\u003e[CxfClient.java](src/main/java/com/fengjing/framework/webservice/cxf/CxfClient.java)\u003c/em\u003e\r\n17. Xfire集成Spring发布WebService 参照\u003cem\u003e[spring-xfire-servlet.xml](src/main/resources/spring-xfire-servlet.xml)、[web.xml](src/main/webapp/WEB-INF/web.xml)\u003c/em\u003e配置\r\n\t* 访问地址:\u003cem\u003e[http://localhost:8080/maven-framework/helloXfireService.ws?wsdl](http://localhost:8080/maven-framework/helloXfireService.ws?wsdl)\u003c/em\u003e\r\n\t* 客户端访问:\u003cem\u003e[HelloXfireServiceClient.java](src/main/java/com/fengjing/framework/webservice/xfire/client/HelloXfireServiceClient.java)\u003c/em\u003e\r\n18. 使用Spring WS编写基于契约优先的WebService 参照\u003cem\u003e[spring-ws-servlet.xml](src/main/resources/spring-ws-servlet.xml)、[web.xml](src/main/webapp/WEB-INF/web.xml)、[applicationContext.xml](src/main/resources/com/fengjing/framework/webservice/springws/client/sws/applicationContext.xml)\u003c/em\u003e等配置\r\n\t* 访问地址:\r\n\t\t1. \u003cem\u003e[http://localhost:8080/maven-framework/sws/services/echo.wsdl](http://localhost:8080/maven-framework/sws/services/echo.wsdl)\u003c/em\u003e\r\n\t\t2. \u003cem\u003e[http://localhost:8080/maven-framework/sws/services/studentDetails.wsdl](http://localhost:8080/maven-framework/sws/services/studentDetails.wsdl)\u003c/em\u003e\r\n\t* 客户端访问\r\n\t\t1. 基于Spring WS方式的客户端调用\u003cem\u003e[StudentDetailsClient.java](src/main/java/com/fengjing/framework/webservice/springws/client/sws/StudentDetailsClient.java)\u003c/em\u003e\r\n\t\t2. 基于SAAJ方式的客户端调用\u003cem\u003e[StudentDetailsClient.java](src/main/java/com/fengjing/framework/webservice/springws/client/saaj/StudentDetailsClient.java)\u003c/em\u003e\r\n19. 使用阿里Druid数据源 参照\u003cem\u003e[spring-data-jpa.xml](src/main/resources/spring-data-jpa.xml)、[web.xml](src/main/webapp/WEB-INF/web.xml)\u003c/em\u003e\r\n\t* 监控地址:[http://localhost:8080/maven-framework/druid/index.html](http://localhost:8080/maven-framework/druid/index.html)\r\n20. 使用Bootstrap框架美化页面\r\n\t* [http://localhost:8080/maven-framework/](http://localhost:8080/maven-framework/)\r\n\t* [http://localhost:8080/maven-framework/npage.do](http://localhost:8080/maven-framework/npage.do)\r\n\r\n\r\n\r\n# 使用说明\r\n1. 手动创建数据库(framework、hibernate4、jdbc_ibatis_mybatis、spring_security)\r\n   * framework(自动创建表和导入数据) 用来演示spring data jpa \r\n   * hibernate4(自动创建表和导入数据) 用来演示 hibernate4\r\n   * jdbc_ibatis_mybatis(自动创建表和导入数据) 用来演示spring jdbc、ibatis、mybatis\r\n   * spring_security(自动创建表和导入数据) 用来演示spring security\r\n2. 修改\u003cem\u003e[jdbc.properties](src/main/resources/jdbc.properties)\u003c/em\u003e文件 里面存放数据库连接信息.主要这里的driver和jdbc url与大家平常见到的不太一致,这是由于使用了sql语句跟踪的框架\r\n\t* log4jdbc (spring jdbc、ibatis、mybatis、spring data jpa、spring security使用他跟踪sql)\r\n\t* p6spy (hibernate使用p6spy跟踪sql)\r\n\t* log4jdbc要结合\u003cem\u003elog4j\u003c/em\u003e来使用\r\n\t* p6spy要结合\u003cem\u003e[spy.properties](src/main/resources/spy.properties)配置文件\r\n\t* 注意查看\u003cem\u003e[log4j.xml](src/main/resources/log4j.xml)文件\r\n3. 其中spring jdbc、ibatis、mybatis,使用同一个数据库\r\n4. 以上配置完成后您可采用一下方式运行该工程,详细使用方式请查看[pom](pom.xml)中的配置或者各插件的帮助文档\r\n   * 跳过单元测试 \u003cem\u003emvn -Dmaven.test.skip=true\u003c/em\u003e 参照[http://maven.apache.org/surefire/maven-surefire-plugin/examples/skipping-test.html](http://maven.apache.org/surefire/maven-surefire-plugin/examples/skipping-test.html)\r\n   * tomcat6 \u003cem\u003emvn tomcat:run\u003c/em\u003e\r\n   * tomcat7 \u003cem\u003emvn tomcat7:run\u003c/em\u003e\r\n   * jetty \u003cem\u003emvn jetty:run\u003c/em\u003e\r\n   * jboss \u003cem\u003emvn jboss:start\u003c/em\u003e \u003cem\u003emvn jboss:hard-deploy\u003c/em\u003e\r\n   * jboss-as \u003cem\u003emvn jboss-as:deploy\u003c/em\u003e \u003cem\u003emvn jboss-as:run\u003c/em\u003e\r\n\t\r\n# 项目托管\r\n\r\n### 该项目不再更新维护，请移步[https://github.com/v5developer/maven-framework-project](https://github.com/v5developer/maven-framework-project)\r\n\r\n* \u003cdel\u003eSVN地址：\u003cem\u003ehttp://maven-framework-project.googlecode.com/svn/trunk/\u003c/em\u003e\u003c/del\u003e (限于大陆google code 不稳定,导致经常无法访问,该地址已不在同步,建议使用github地址)\r\n* GitHub地址：\u003cem\u003ehttps://github.com/sxyx2008/maven-framework-project/\u003c/em\u003e\r\n\r\n最后希望有兴趣的朋友可以加入进来，大家一起完善他。把自己的技术分享出来。如有任何问题可以与我联系\r\n\r\n\r\n# 联系方式\r\n* QQ：\u003cem\u003e184675420\u003c/em\u003e\r\n* Email：\u003cem\u003esxyx2008@gmail.com\u003c/em\u003e\r\n\r\n\r\n[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/sxyx2008/maven-framework-project/trend.png)](https://bitdeli.com/free \"Bitdeli Badge\")\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fv5tech%2Fmaven-framework-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fv5tech%2Fmaven-framework-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fv5tech%2Fmaven-framework-project/lists"}