GraalVM Tools for Micronaut ExtensionGraalVM Tools for Micronaut provides support for developing Micronaut applications with Visual Studio Code (VS Code). The Micronaut framework is a lightweight reactive framework that provides a solid foundation for building cloud native Java microservices. Thanks to Micronaut Data, the database access toolkit, you can access the database and execute queries. While being a Technology Preview release, the extension already provides many features to boost your Java 8+ and Micronaut productivity in the VS Code environment:
While the extension delivers all these features on its own, it works best when used together with the GraalVM Tools for Java extension. You get all the GraalVM-specific features like the innovative Graal compiler for better performance, ahead-of-time compilation with GraalVM Native Image, debugging with different protocols, built-in VisualVM, and many more. Extension InstallationThe prefered way is installing the GraalVM Tools for Micronaut extension via the GraalVM Extension Pack for Java. The extension pack also ships the Apache NetBeans Language server and GraalVM Tools for Java extension. If you install GraalVM Tools for Micronaut extension, the others will be installed for you in the background:
The entrypoint to the Micronaut extension is the Micronaut Tools page which opens as soon as the extension is installed or using the Command Palette command Micronaut: Show Micronaut Tools Page. Extension SettingsThe GraalVM Tools for Micronaut extension contributes to the following settings in VS Code:
Micronaut Project Creation WizardThe extension provides two possibilities to create a new Micronaut project: using the Micronaut Launch service or using a local Micronaut CLI installation. To create a new project using the project creation wizard, go to View, Command Palette, search for "micronaut" and invoke the Micronaut: Create Micronaut Project command. Then follow the prompts. It supports generating Micronaut applications, CLI applications, and other types of applications. Check the extension documentation for more information. Running and Debugging Micronaut ApplicationsThe GraalVM Tools for Micronaut extension provides complete support for application development and debugging in VS Code for Micronaut developers, including regular features like auto completion, code navigation, refactoring, etc. You can package a Micronaut application into a runnable JAR and run it in different ways:
The default nature of the Micronaut framework offers reduced use of Java reflection, runtime proxy generation, and dynamic classloading. It results in performance, memory and startup improvements, and makes it easier to debug Micronaut applications. To run the Micronaut application in debug mode, switch to the Run and Debug view by clicking on the bug icon in the left-hand side panel, select the Java 8+ environment: It will run your current Micronaut project, letting you debug it. Ahead-of-time Compilation with GraalVM Native ImageThe Micronaut support in combination with GraalVM Tools for Java extension opens many more possibilities for Java developers. Thanks to the tight integration with GraalVM Native Image, you can convert a Micronaut application into a native executable, which has significant benefits, particularly for serverless and microservice workloads. As long as the current active GraalVM installation has its Native Image component installed, your Micronaut application can be easily converted into a native binary using a single Command Palette command Micronaut: Build Native Image. There is also a possibility to create a native executable inside of a Docker image using the Micronaut: Build… command and selecting the appropriate dockerBuildNative target. Least but not last, you can debug your Micronaut application launched as a native executable from VS Code! To enable the debugging mode, you have to add the debugger configuration, Native Image: launch, into the Docker SupportWith this extension, you can build a Docker image of a Micronaut application, or even create a Docker image containing an executable generated by GraalVM Native Image and deploy it in a container. Build and push Docker images to a Docker registry from VS Code: A particular Docker Registry can be configured in the build, see the Micronaut Deploying Application documentation. Kubernetes SupportGraalVM Tools for Micronaut provides all of the necessary tooling for a complete developer experience in VS Code, including Kubernetes support for automated deployment, scaling and management of containers. You can deploy a containerized Micronaut application into a Kubernetes cluster to a container registry, interactively run and debug it directly from VS Code. The following quick commands are available for you: Database SupportThe GraalVM Tools for Micronaut extension provides out of the box integration with databases.
The database management can be done using the DATABASES explorer which finds available connections and allows you to connect to a database using the appropriate JDBC driver.
The database support covers the whole development workflow from creating a database, adding a connection, to setting up the runtime environment for a Micronaut application with the selected database.
You can generate Integration with Oracle Cloud and Oracle Autonomous DatabaseThis extension is the best solution to "communicate" with and transfer data to Oracle Cloud immediately from within VS Code. Thanks to the CLOUD explorer, you can create and/or connect to Oracle Autonomous Database. The extension integrates with Oracle Developer Tools for VS Code (SQL and PLSQL) which enables you to add JDBC connection to the database. Provide Feedback or Seek HelpPrivacy PolicyRead the Oracle Privacy Policy to learn more. |