在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:agoncal/agoncal-application-petstore-ee6开源软件地址:https://github.com/agoncal/agoncal-application-petstore-ee6开源编程语言:Java 75.4%开源软件介绍:Application - Petstore Java EE 6
Purpose of this applicationDo you remember the good old Java Petstore ? It was a sample application created by Sun for its Java BluePrints program. The Java Petstore was designed to illustrate how J2EE (and then Java EE) could be used to develop an eCommerce web application. Yes, the point of the Petstore is to sell pets online. The Petstore had a huge momentum and we started to see plenty of Petstore-like applications flourish. The idea was to build an application with a certain technology. Let's face it, the J2EE version was far too complex using plenty of (today outdated) design patterns. When I wrote my Java EE 5 book back in 2006, I decided to write a Petstore-like application but much simpler. But again, it's out-dated today. So what you have here is another Petstore-like application but using Java EE 6 and all its goodies (CDI, EJB Lite, REST interface). It is based on the Petstore I developped for my Java EE 5 book (sorry, it's written in French). I've updated it to be more Java EE 6, ask some friends to contribute, and here we are. The goals of this sample is to :
If you want to use a different web interface, external frameworks, add some sexy alternative JVM language… feel free to fork the code. But we won't do it. We want this EE 6 Petstore to remain simple and to stick to Java EE 6. The only external framework that we use is Arquillian. Arquillian is used for integration testing. Using Maven profile, you can test services, injection, persistence... against different application servers Component diagramGlassfish 3.1.2Glassfish is the Java EE 6 reference implementation. Compile and packageBeing Maven centric, you can compile and package it with GlassFish is the default deployment application server, so you don't need to use any Maven profile. But if you wanted you could do Test with Glassfish embeddedLaunching tests under Glassfish is straight forward. You only have to lauch :
Galssfish will launch during the build and tests will be executed in it. Deploy in GlassfishThis sample has been tested with GlassFish 3.1.2 in several modes :
JBoss 7.1.1JBoss 7.x implements Java EE 6. Test with JBoss managedTo launch tests under JBoss you first should install JBoss and set the environnment variable
During the build, Arquillian will launch JBoss and execute the tests in it. Deploy with JBoss 7.1.1Execute the sampleOnce deployed go to the following URL and start buying some pets: http://localhost:8080/applicationPetstore. You can use these login/passwd : marc/marc bill/bill jobs/jobs The admin REST interface allows you to create/update/remove items in the catalog, orders or customers. You can run the following curl commands :
You can also get a JSON reprensetation as follow :
Third Party Tools & FrameworksTwitter BootstrapWhen, like me, you have no web designer skills at all and your web pages look ugly, you use Twitter Bootstrap ;o) Silk IconsI use Silk Icons which are in Creative Commons ArquillianJRebelJRebel is a JVM-plugin that makes it possible for Java developers to instantly see any code change made to an app without redeploying. It is very useful when you develop in a managed environment like application servers. If you need/want to use JRebel, just follow the manual. To generate a rebel.xml file just do SonarSonar provides services for continuous inspection of code quality. I use it to have some metrics on the Yaps Petstore (and produce, hopefully, not too ugly code with good code coverage). You can also use it to get some metrics. Download, install and run Sonar with DeveloppersSome people who worked on this project :
Bugs & Workaround
Licensing
antonio goncalves
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论