领先一步
VMware 提供培训和认证,助您加速进步。
了解更多我们使用了以下Spring特性
我们获得了社区中许多专家的贡献(包括几个开源项目的负责人)。
如果您还没有听说过,Thymeleaf可以被视为JSP的替代品。它将自己定义为XML / XHTML / HTML5模板引擎。
它基于一些普通的HTML文件,带有一些命名空间的魔法。
Thymeleaf项目的Daniel和Soraya创建了一个Spring-Petclinic分支,该分支使用Thymeleaf代替JSP。他们在这篇博客文章中记录了迁移步骤:http://www.thymeleaf.org/petclinic.html
Spring Petclinic的Thymeleaf分支可在此处获取:https://github.com/thymeleaf/thymeleafexamples-petclinic
了解更多关于Thymeleaf的信息:http://www.thymeleaf.org
在twitter上关注Thymeleaf:https://twitter.com/thymeleaf
Dandelion提供了一组标签库,您可以将其与JSP或Thymeleaf一起使用。
我们已在Spring-Petclinic内部使用它来处理DataTables。它基于jQuery DataTables和Bootstrap生成表格。
你可以这样做
<datatables:table data="${ownerList}" id="dataTable" theme="bootstrap2" export="pdf">
<datatables:column title="Name" property="name" sortable="true" />
<datatables:column title="Address" property="address" sortable="true" />
</datatables:table>
输出的html表格看起来像这样
Dandelion在Spring Petclinic的主分支中使用。
Dandelion项目的Thibault Duchateau撰写了一篇精彩的博客文章,描述了Spring Petclinic应用程序的迁移
了解更多关于Dandelion的信息:http://dandelion.github.com/在twitter上关注他们:https://twitter.com/dandelion_proj
默认情况下,Spring Petclinic使用Maven,因为它是Java应用程序最常见的选择。虽然Spring Petclinic与大多数实际应用程序相比相当小,但其Maven pom.xml文件已经非常冗长。
来自Thoughtworks China的Li Yanhui非常友好地将Spring Petclinic迁移到Gradle。这是一种并排比较Maven和Gradle的好方法。build.gradle配置文件确实更易于理解。它目前包含143行(而Maven POM为543行)。
您可以在此处浏览基于Gradle的Spring Petclinic版本:https://github.com/whimet/spring-petclinic 感谢他们,我们能够识别出Spring Petclinic内部一些存在代码重复和缺乏自动化测试的地方。
是否有可能在单个服务器实例上将当前的Spring Petclinic扩展到每秒1000个请求?Ippon Technologies的Julien Dubois就此主题撰写了一系列五篇精彩的博客文章。
它回答了以下问题: - 我应该依赖会话上下文吗?(第二部分) - 我应该使用哪个Apache Tomcat连接器?(第二部分) - 我应该使用哪个数据库连接池?(第三部分) - JDBC是否比JPA或Spring Data JPA更快?( 第四部分) - 使用OpenSessionInViewFilter有什么优点?( 第四部分)
GitHub上的Spring Petclinic Cloud Foundry上的Spring Petclinic Petclinic + Thymeleaf Petclinic + Gradle