An application builder to allow you to construct starter applications for building your projects with Liberty.
Liberty app accelerator is still in its early stages so we will be adding new technologies and capabilities to the page over time. For now, feel free to try it out and see how quickly you can have a fully fledged application. If you have any questions, comments or suggestions please raise an issue on our GitHub repository.
For an introduction see our blog post. To learn how the Liberty Starter can be used to create the image service for the Plants by WebSphere evolution from monolith to microservice, see our new article.
The current technologies we have are:
This provides you with the jaxrs-2.0 feature and the jsonp-1.0 feature.
Inside the application project produced there is a application.rest package containing the LibertyRestEndpoint class. This adds a REST endpoint which you can access at /rest. Inside the wlpcfg project there is the it.rest.LibertyRestEndpointTest that will test the REST endpoint to ensure it is working.
For the complete feature documentation, see the jaxrs-2.0 feature description in IBM Knowledge Center.
This provides you with the servlet-3.1 feature.
Inside the application project there is a application.servlet package containing the LibertyServlet class. This adds a servlet with an endpoint which you can access at /servlet. Inside the wlpcfg project there is the it.servlet.LibertyServletTest that will test the servlet's endpoint to ensure it is working.
For the complete feature documentation, see the servlet-3.1 feature description in IBM Knowledge Center.
This provides you with a SpringBoot application that will run on WebSphere Liberty.
Inside the application project there is a application.springboot package containing two classes:
- SpringBootLibertyApplication: The entry point for the SpringBoot application.
- LibertyHelloController: A Spring MVC endpoint which you can access at /springBoot.
Inside the wlpcfg project there is the it.springboot.HelloControllerTest that will test the Spring MVC endpoint to ensure it is working.
This provides you with the websocket-1.1 feature.
For the complete feature documentation, see the websocket-1.1 feature description in IBM Knowledge Center.
This provides you with jpa-2.1. For the complete feature documentation, see the jpa-2.1 feature description in IBM Knowledge Center.
The Watson SDK provides an API for accessing Watson Services. For the complete documentation, take a look at the Watson developer pages and the Watson SDK github project.
Once you have downloaded the project, to build it you just need to run the command gradle clean build in the top level project. Once the application has been built you can either run gradle :liberty-starter-application:libertyStart to start the application or grab the StarterServer folder that is in liberty-starter-wlpcfg/servers and copy that into an existing Liberty install and run server run StarterServer. The application should be available at localhost:9082.
The project is split up into several different pieces.
liberty-starter-applicationcontains the code to build the main application including the code for the UIliberty-starter-commoncontains common api code for the projectsliberty-filter-applicationis a simple war that redirects people to the context/startliberty-starter-wlpcfgcontains the Liberty usr directory where the logs and apps for the app accelerator will be put after a build
There are then a set of starter-microservice-techId projects that contain the code for the individual technology types.
To see an example of everything you can include in a technology see the starter-microservice-test project. This is the example project we use to test the main piece of the app against.
To create a new technology you can start by creating a copy of once of the existing technologies. You then need to make a few small changes to make the rest of the app aware of the new technology:
-
In
liberty-starter-application/src/main/resourcesupdate the services.json file to add your new technology, including an id, name, description and the endpoint you want to use. This will add your technology as an option on the main page. -
In the build.gradle file in
liberty-starter-applicationin the last set ofdependsOncommands add your technology to thewar.dependsOnlist. You need to add:nameOfYourProject:publishWar. This will add your project to the build lifecycle. -
In
liberty-starter-wlpcfg/servers/StarterServer/server.xmladd your application to the list. You need to provide the name of the war file being created in location, the context-root that matches the endpoint specified in theservices.jsonfile in step 1 and the id you specified in step 1.
If you run gradle clean build your new project should now be built and the war should be put into the apps directory of your server.