Skip to content

asposemarketplace/Aspose_for_Spring.Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Aspose for Spring Java

Aspose for Spring.Java provides usage samples / sourcecodes for the demonstration of Aspose API for Java by extending famous Spring Java PetClinic Sample Web Application.

This extension of "Spring Java PetClinic Sample Web Application" also shows the Integration of Aspose APIs with Spring MVC, JSP and Maven Project.

This extension helps you to explore Aspose Java components within Spring Framework / Spring MVC /Maven environments

Aspose Extension for Spring PetClinic Sample Web Application

What does it look like?

-spring-petclinic has been deployed here on cloudfoundry: http://demo-spring-petclinic.cfapps.io/

Recommended Links

  1. Youtube Video Demo of the project
  2. Aspose Java APIs

This Extension of Spring PetClinic Sample Application for Aspose API includes the following new features and webpages updates:

Latest Release v1.1

What's New

  1. Local Aspose Maven Dependencies have been replaced with Aspose Centralized APIs Maven Dependencies supported by Aspose Cloud Maven Repository for Aspose.Words, Aspose.Pdf, Aspose.Cells, Aspose.Email and Aspose.Barcode Java APIs. See the pom.xml file.
  2. Size of the project has been reduced from 48 MB to 2 MB because of removal of local dependencies from project.
  3. UI enhancements
  4. Use case for showcasing Aspose.Words Java API feature of converting HTML to MS-WORD added by providing new option image of HTML to MS-WORD export on bottom of all webpages that converts the current web page (html) with images into MS-WORD file and save to disk.
  5. Bug fixes and to avoid PermGen errors, allocation defined for IntelliJ IDEA in .idea/workspace.xml configuration file.

Release - v1.0

  1. On Veterinarians Page, Availability Days and Email Addresses are added, by Clicking on Email Address of any one will open Email Form where you can write email to the Veterinarian and send it through your Outlook Client by using Aspose APIs (Aspose.Email)
  2. On Veterinarians Page, You can export Veterinarians List to PDF, MS-Word and MS-Excel Formats using Aspose APIs (Aspose.PDF, Aspose.Words, Aspose.Cells)
  3. On Owners List Page, You can export Veterinarians List to PDF, MS-Word and MS-Excel Formats using Aspose APIs (Aspose.PDF, Aspose.Words, Aspose.Cells)
  4. On Add Visit Page, You can now also Feed Bill Amount in $ which will later display along with generated Barcode image on the Add Visit Page and Owners Information Page by using Aspose APIs (Aspose.Barcode)
  5. Export to PDF, MS-Word and MS-Excel documents (On Veterinarians Page & Owners List Page) also shows the sample usages of Aspose APIs for inserting Images, Formattings and Tables to the generated documents using Aspose.Words, Aspose.PDF and Aspose.Cells
  6. For creating / displaying Barcode Image using Aspose APIs (Aspose.Barcode) on JSP or any MVC Framework using JSP as Views, Tag Library aspose:getBarcodeUrl is created through which a Barcode Image can be very easily generated and embeded on the page providing CodeText / Amount and Symbology (Type of Barcode i.e Code128, QR) through tag attributes.
  7. Source code of usage of above features of Aspose API (Aspose.PDF,Aspose.Words, Aspose.Cells, Aspose.Email, Aspose.Barcode) are included in this project repository (Integrated with ready to run PetClinic Spring Sample Web Application).
  8. Source Codes of Tag Library for Aspose.Barcode usage for JSPs also included with the project sources code and demonstrated on Add/Edit Visit Page and Owners Information Page
  9. This Spring PetClinic Web Application extension for Aspose API also shows the Aspose APIs integration with Maven

Understanding the Spring Petclinic application with a few diagrams

See the presentation here

Running petclinic locally

	git clone https://github.com/asposemarketplace/Aspose_for_Spring.Java.git
	mvn tomcat7:run

You can then access petclinic here: http://localhost:9966/petclinic/

Note: In case of any PermGen related JVM error, adjust PermGen memory space by setting the appropriate values to MAVEN_OPTS environment variable.

For Example:

export MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=128m"

(or on Windows:)

set MAVEN_OPTS=-Xmx512m -XX:MaxPermSize=128m

Working with Petclinic in JetBrains

The following items should be installed in your system:

Working with Petclinic in Eclipse/STS

prerequisites

The following items should be installed in your system:

Note: when m2e is available, there is an m2 icon in Help -> About dialog. If m2e is not there, just follow the install process here: http://eclipse.org/m2e/download/

Steps:

  1. In the command line
git clone https://github.com/asposemarketplace/Aspose_for_Spring.Java.git
  1. Inside Eclipse
File -> Import -> Maven -> Existing Maven project
  1. Inside IntelliJ
File--> Open -> select spring-petclinic Project

Looking for something in particular?

Inside the 'Web' layerFiles
Spring MVC- Atom integration VetsAtomView.java mvc-view-config.xml
Spring MVC - XML integration mvc-view-config.xml
Spring MVC - ContentNegotiatingViewResolver mvc-view-config.xml
Spring MVC Test Framework VisitsViewTest.java
JSP custom tags WEB-INF/tags createOrUpdateOwnerForm.jsp
webjars webjars declaration inside pom.xml
Resource mapping in Spring configuration
sample usage in JSP
Dandelion-datatables ownersList.jsp vetList.jsp web.xml
Branch using GemFire and Spring Data GemFire instead of ehcache (thanks Bijoy Choudhury) See here
'Service' and 'Repository' layersFiles
Transactions business-config.xml ClinicServiceImpl.java
Cache tools-config.xml ClinicServiceImpl.java
Bean Profiles business-config.xml ClinicServiceJdbcTests.java web.xml
JdbcTemplate business-config.xml jdbc folder
JPA business-config.xml jpa folder
Spring Data JPA business-config.xml springdatajpa folder
OthersFiles
Gradle branch See here

Interaction with other open source projects

One of the best parts about working on the Spring Petclinic application is that we have the opportunity to work in direct contact with many Open Source projects. We found some bugs/suggested improvements on various topics such as Spring, Spring Data, Bean Validation and even Eclipse! In many cases, they've been fixed/implemented in just a few days. Here is a list of them:

Name Issue
Spring JDBC: simplify usage of NamedParameterJdbcTemplate SPR-10256 and SPR-10257
Bean Validation / Hibernate Validator: simplify Maven dependencies and backward compatibility HV-790 and HV-792
Spring Data: provide more flexibility when working with JPQL queries DATAJPA-292
Eclipse: validation bug when working with .tag/.tagx files (has only been fixed for Eclipse 4.3 (Kepler)). See here for more details. STS-3294

About

Aspose for Spring.Java provides source code and detailed usage instructions for extending the existing Spring.Java samples.

Resources

License

Stars

Watchers

Forks

Packages

No packages published