spring-native | Spring Native is now superseded by Spring Boot 3 official | Application Framework library

 by   spring-projects-experimental Java Version: 0.12.2 License: Apache-2.0

kandi X-RAY | spring-native Summary

kandi X-RAY | spring-native Summary

spring-native is a Java library typically used in Server, Application Framework, React Native, Spring Boot, Spring, Gradle applications. spring-native has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has medium support. You can download it from GitHub.

Spring Native provides beta support for compiling Spring applications to native executables using GraalVM native-image compiler, in order to provide a native deployment option typically designed to be packaged in lightweight containers. In practice, the target is to support your Spring Boot application , almost unmodified, on this new platform. Watch the video and read the blog post of Spring Native Beta announcement to learn more.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              spring-native has a medium active ecosystem.
              It has 2776 star(s) with 351 fork(s). There are 98 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 0 open issues and 1391 have been closed. On average issues are closed in 413 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of spring-native is 0.12.2

            kandi-Quality Quality

              spring-native has 0 bugs and 0 code smells.

            kandi-Security Security

              spring-native has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              spring-native code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              spring-native is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              spring-native releases are available to install and integrate.
              Build file is available. You can build the component from source.
              Installation instructions are available. Examples and code snippets are not available.
              It has 81716 lines of code, 5821 functions and 1442 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed spring-native and discovered the below as its top functions. This is intended to give you an instant insight into spring-native implemented functionality, and help decide if they suit your requirements.
            • Configures the target type .
            • Find and register native hints .
            • Process the given configuration class .
            • Handle constant hints .
            • Generate the artifacts for the given sources .
            • Pack a type hint .
            • Serialize a class descriptor .
            • Produce a hint for the client interface .
            • Execute the generate goal .
            • Gets the build time proxy .
            Get all kandi verified functions for this library.

            spring-native Key Features

            No Key Features are available at this moment for spring-native.

            spring-native Examples and Code Snippets

            No Code Snippets are available at this moment for spring-native.

            Community Discussions

            QUESTION

            How to fix Non-resolvable import POM: com.google.cloud:spring-cloud-gcp-dependencies
            Asked 2022-Mar-24 at 20:44

            Trying to build spring-cloud-gcp from https://github.com/GoogleCloudPlatform/spring-cloud-gcp

            1. Many failed compile/install attempts due to failed tests (unit and checkstyle) - decided to just disable and/or not fail due to tests - great, that worked, entire build (all sub projects) compiled
            2. Wanted to deploy the spring-cloud-gcp-data-firestore-sample (pom is below) to Cloud run, so changed the parent reference in the pom (as suggested/documented in the pom).
            3. Now can't compile/install spring-cloud-gcp-data-firestore-sample and get this error "**Non-resolvable import POM: com.google.cloud:spring-cloud-gcp-dependencies:pom:2.3.12.RELEASE was not found in https://repo.maven.apache.org/maven2**"

            I've tried:

            1. Adding additional spring maven repos to the pom (see pom below) - no luck, and based on the error message maven doesn't even seem to be checking the added repo's
            2. referencing/using different versions of the spring-boot-starter-parent - no luck, nothing changed in the error
            3. mvn -U clean compile - no luck

            Anyone got any ideas? Any suggestions greatly appreciated.

            ...

            ANSWER

            Answered 2022-Mar-24 at 20:44

            You are inheriting version for com.google.cloud:spring-cloud-gcp-dependencies from project.version, which is 2.3.12.RELEASE in your case.

            Source https://stackoverflow.com/questions/71607352

            QUESTION

            Spring Boot Docker Native image of Spring R2DBC application on Java 16 fails on unsupported methdod
            Asked 2021-Oct-19 at 22:08

            I have a simple application built on top of org.springframework.boot:spring-boot-starter-parent version 2.5.4-SNAPSHOT and some derived dependencies:

            • org.springframework.boot:spring-boot-starter-data-r2dbc
            • org.springframework.boot:spring-boot-starter-webflux
            • org.springframework.boot:spring-boot-starter-actuator
            • io.r2dbc:r2dbc-postgresql

            I use org.springframework.experimental:spring-native version 0.10.3 to enable Spring Native and build using the following plugin:

            ...

            ANSWER

            Answered 2021-Oct-19 at 22:08

            For this problem, there has been reported a bug #3870 afterwards on the Oracle/Graal project reproducible on GraalVM 21.3.

            The issue is waiting for its resolution.

            Source https://stackoverflow.com/questions/69309560

            QUESTION

            Native Executable with Quarkus or Springboot and JavaFx
            Asked 2021-Sep-13 at 12:12

            I am trying to build a native executable for an app that works with Quarkus and JavaFx. The only way I have managed to achieve this has been marking lots of javaFx classes as --initialize-at-run-time, but this causes that, when trying to start the app, it fails with the following message:

            ...

            ANSWER

            Answered 2021-Sep-13 at 12:12

            Updated After a suggestion from José Pereda I have tried migrating the backend to Micronaut and have been able to build the native image successfully. The migration from springboot to micronaut was very easy to do. Just changing the parent in the pom and the basic dependencies.

            The native image is generated with the maven code: mvn clean gluonfx: build -Pnative-gluonfx

            Maybe you need to use first the goal gluonfx:runagent to generate the config files needed to run.

            In my experience I had some dependencies issues that only noticed when running the goal gluonfx:nativerun after the build was done. And then adjust the code.

            I leave here a minimal example in case someone needs it: https://github.com/ikaro143/example-micronaut

            PS: Be sure your main class is registered for reflection.

            Source https://stackoverflow.com/questions/69119724

            QUESTION

            Configure timing of opening ports in Spring-Boot application
            Asked 2021-Aug-30 at 09:10

            Question: Is there an option within spring or its embedded servlet container to open ports when spring is ready to handle traffic?

            Situation: In the current setup i use a spring boot application running in google cloud run.

            Circumstances:

            • Cloud run does not support liveness/readyness probes, it considers an open port as "application ready".

            • Cloud run sends request to the container although spring is not ready to handle requests.

            • Spring start its servlet container, open its ports while still spinning up its beans.

            Problem: Traffic to an unready application will result in a lot of http 429 status codes.

            This affects:

            • new deployments
            • scaling capabilities of cloud run

            My desire:

            1. Configure spring/servlet container to delay opening ports when application is actually ready Delaying opening ports to the time the application is ready would ease much pain without interfering too much with the existing code base.

            2. Any alternatives not causing too much pain?

            3. Things i found and considered not viable

              • Using native-image is not an option as it is considered experimental and consumes more RAM at compile time than our deployment pipeline agents allow to allocate (max 8GB vs needed 13GB)

              • another answer i found: readiness check for google cloud run - how? which i don't see how it could satisfy my needs, since spring-boot startup time is still slow. That's why my initial idea was to delay opening ports

            I did not have time to test the following, but one thing i stumbled upon is

            ...

            ANSWER

            Answered 2021-Aug-30 at 09:10

            As you are well aware of the fact that “Cloud Run currently does not have a readiness/liveness check to avoid sending requests to unready applications” I would say there is not much that can be done on Cloud Run’s side except :

            • Try and optimise the Spring boot app as per the docs.
            • Make a heavier entrypoint in Cloud Run service that takes care of more setup tasks. This stackoverflow thread mentions how “A ’heavier’ entrypoint will help post-deploy responsiveness, at the cost of slower cold-starts” ( this is the most relevant solution from a Cloud Run perspective and outlines the issue correctly)
            • Run multiple processes in a container in Cloud Run as you mentioned.

            This question seems more directed at Spring Boot specifically and I found an article with a similar requirement. However, if you absolutely need the app ready to serve when requests come in, we have another alternative to Cloud Run, Google Kubernetes Engine (GKE) which makes use of readiness/liveness probes.

            Source https://stackoverflow.com/questions/68678300

            QUESTION

            maven No plugin descriptor found at META-INF/maven/plugin.xml in springboot
            Asked 2021-Aug-24 at 08:00

            I'm tryying to use GraalVM native-image to compile a spring-boot project to build an .exe file.

            my pom.xml :

            ...

            ANSWER

            Answered 2021-Aug-24 at 08:00

            That's right, because org.graalvm.nativeimage:jvmti-agent-base is not a Maven plugin. As the artifact's description jvmti-agent-base is a

            Base framework for creating a JVMTI agent.

            Try this:

            Source https://stackoverflow.com/questions/68903618

            QUESTION

            `@PreAuthorize` with spring-native triggers packaging error: `repeated interface: org.springframework.aop.SpringProxy`
            Asked 2021-Aug-20 at 19:48

            I'm trying to build native images for spring-boot apps in a maven multi-module project.

            As soon as I decorate a @Controller method with @PreAuthorize, native image generation fail with the message below.

            Following spring-native samples, I tryed both with (as done in security-method-class-proxies) and without (as done in security-method) @AotProxyHint on application class, but this made no difference.

            The error:

            ...

            ANSWER

            Answered 2021-Aug-20 at 19:48

            I figured out two things about this error:

            1. as soon as @PreAuthorize targets a class member (not an interface), configuration must provide an @AotProxyHint(targetClass = ..., proxyFeatures = ProxyBits.IS_STATIC) for this class
            2. there is bug on Windows about that declared in spring-native issues

            Source https://stackoverflow.com/questions/68535572

            QUESTION

            Spring cloud function does not work with spring native
            Asked 2021-May-27 at 13:37

            I have been trying to replicate this aws function example to deploy a lambda with spring cloud function and graalvm.

            The function works locally and starts up without a problem.

            ...

            ANSWER

            Answered 2021-May-11 at 15:33

            Have you seem this example - https://github.com/spring-projects-experimental/spring-native/tree/main/samples/cloud-function-aws?

            Also, there were issues with that new CustomRuntimeEventLoop that have already been addressed, so consider using the latest snapshot.

            Source https://stackoverflow.com/questions/67465840

            QUESTION

            spring-aot-maven-plugin failing on mvn clean package
            Asked 2021-May-09 at 21:06

            I have a project early created and when trying to run mvn clean package command, or any other mvn command to build my .jar, the spring AOT plugin is throwing the following error:

            ...

            ANSWER

            Answered 2021-May-09 at 21:06

            Just remove Spring Native developer tool plugin, if you don't need it.

            Source https://stackoverflow.com/questions/66986235

            QUESTION

            How to create Springboot App with postgres using spring native graalvm?
            Asked 2021-May-02 at 18:34

            I was trying to create a CRUD app using spring boot and postgres ,alongwith spring native.But I couldn't find any proper documentation related to it apart from spring native documentation.

            The part of how to integrate it with postgres,is what I am looking for.Thankyou

            ...

            ANSWER

            Answered 2021-May-02 at 18:34

            You can use Spring Data like you would in a standard Spring Boot application. Depending on the type of application, you can use Spring Data JDBC, Spring Data JPA (if you need the Hibernate features), or Spring Data R2DBC (for reactive apps). If you bootstrap your application from start.spring.io, you can directly select the PostgreSQL dependency from there.

            To get started with Spring Data, you can refer to this guide on the Spring website: relational data access with Spring Data JDBC. It uses H2, but you can replace it with PostgreSQL. More details are available on the project documentation.

            On my GitHub, you can find an example of Spring Boot application with a REST API, security, and data persistence with PostgreSQL. And packaged as a native executable through Spring Native. If you're new to Spring Native, I wrote an article about how to get started with it.

            Source https://stackoverflow.com/questions/67349467

            QUESTION

            Error in downloading dependency from 2 mirrors in Maven
            Asked 2021-Apr-27 at 07:31

            I want to download spring-native dependency from maven mirror as it is not in my third party mirror.I tried to do it by including maven mirror in my settings.xml file,but it doesn't work.

            Settings.xml file-

            ...

            ANSWER

            Answered 2021-Apr-27 at 07:31

            When you use * then you essentially override all other mirrors and repository definitions. To exclude repositories from the mirror, use

            *,!otherrepo

            Source https://stackoverflow.com/questions/67278644

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install spring-native

            The easiest way to start with Spring Native is probably to go to start.spring.io, add the Spring Native dependency, and read the reference documentation. Make sure to configure properly the Spring AOT Maven and Gradle plugins that are mandatory to get proper native support for your Spring application.

            Support

            If you have not previously done so, please sign the Contributor License Agreement. You will be reminded automatically when you submit the pull request. Contributions are welcome, especially for adding support via pull requests for libraries widely used in the Spring ecosystem not yet support. Please refer to the how to contribute section for more details. This project requires Java 11.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/spring-projects-experimental/spring-native.git

          • CLI

            gh repo clone spring-projects-experimental/spring-native

          • sshUrl

            git@github.com:spring-projects-experimental/spring-native.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular Application Framework Libraries

            Try Top Libraries by spring-projects-experimental

            spring-authorization-server

            by spring-projects-experimentalJava

            spring-fu

            by spring-projects-experimentalJava

            spring-graalvm-native

            by spring-projects-experimentalJava

            spring-boot-thin-launcher

            by spring-projects-experimentalJava

            spring-boot-migrator

            by spring-projects-experimentalJava