A tool to create cloud-native Java microservices: MicroProfile Starter 1.0
MicroProfile Starter (Beta) was released in February of 2019 and as of January 27, 2020, there had been 12,421 projects created via MicroProfile Starter! Now, the already popular tool is ready for its public release and is generally available.
What is the tool?
MicroProfile Starter helps developers create microservices projects by choosing the runtime they’re most comfortable with from a list of available implementations. You simply make a few selections in the form and MicroProfile Starter generates a zipped file with sample source code and a README file with detailed instructions on how to build and run it. The generated sample source code provides developers a quick onramp to get started with the MicroProfile APIs.
What’s new with MicroProfile Starter?
Since the Beta release, the tool has been updated to include features and enhancements from community members and end users as well as each new version of MicroProfile along with the available MicroProfile Runtimes for each version, and there is also a REST API to generate sample projects from the command line and through IDE extensions.
In addition to supporting Java 8, the tool now includes the option to select Java 11 as well. This has been added as a convenience option for developers wanting to build the generated sample source code using Java 11. It is worth mentioning that the tool will only display the Java 11 option only for the MicroProfile Runtimes that support Java 11 for their implementations.
How to use MicroProfile Starter?
- Visit start.microprofile.io.
- Enter your groupID and artifactID into the text boxes (or leave default values).
- Choose MicroProfile Version from the drop-down menu.
- The server implementations available for the chosen MicroProfile version will appear in the MicroProfile Server drop-down menu. If you don’t see an implementation you would like to use, try selecting a different MicroProfile version.
- Choose the Java SE Version that you would like to use to build the generated sample source code.
- Check the boxes for the specifications for which you want to receive code examples.
- Click the download button to save the generated zipped file containing the sample source code.
Use the REST API
Besides the possibility to create the project through the GUI, we have added the possibility to access the functionality programmatically.
This allows you to generate a project from the command line when you know all the parameters you need to specify. To help you with that, you can request the documentation, by executing the following command from your command line (for convenience, you can also find this command at the bottom left side of the landing page next to the label “Command line:”):
Based on that documentation, you define the parameters to generate a project with your chosen implementation. Here’s an example using Payara Micro in which the latest available supported MicroProfile version has been selected:
curl -O -J ‘https://start.microprofile.io/api/project?supportedServer=PAYARA_MICRO&selectAllSpecs=true’
The parameter selectAllSpecs tells the generator that it needs to include examples for all specifications, just as you would do on the GUI.
Use the IDE extensions
In addition to the command line access, a set of IDE plugins exist to make use of this REST endpoint and create the project immediately within your IDE. That way, the MicroProfile project is created right into your familiar work environment.
Add the plugin or extension to your IDE, launch it and follow the prompts to make your selection, and you will have a project generated in your workspace that you can edit right away.
We are also working with VS Code to create a MicroProfile Extension Pack on their Java Overview page. Watch this space.
If you’d like to get involved in this project and contribute to it, please reach out to us via the MicroProfile Google Group or directly open an issue by clicking “See the code” on https://start.microprofile.io. You can also get connected with us via Gitter chat.
Our Eclipse Che plugin should be publicly available soon but we still help creating an Eclipse IDE plugin. Any help on this is always welcome and appreciated.
We hope you continue to enjoy the MicroProfile Starter.