Git Product home page Git Product logo

spring-kotlin-functional's Introduction

This project is designed to demonstrate:

This sample does not use functional bean registration for 3 main reasons:

  • This is not yet well supporting with native/AOT, see spring-framework#29555 related issue.
  • Spring Fu development is frozen while the Spring team figures out a better option to provide first class support for functional configuration well integrated in Spring Boot, see spring-boot#8115 related issue.
  • Spring AOT transforms automatically annotation-based JavaConfig configuration model to functional bean registration executed at runtime.

Getting started

  • Build the project and run tests with ./gradlew build
  • Run the application with ./gradlew bootRun
  • Create a native executable with ./gradlew nativeCompile then run build/native/nativeCompile/spring-kotlin-functional executable (add .exe on Windows)
  • Build an optimized native container with ./gradlew bootBuildImage

AOT on the JVM

AOT generation happens when either id("org.graalvm.buildtools.native") or id("org.springframework.boot.aot") plugins are activated.

If you want to leverage to speedup the application startup on the JVM:

  • Unpack the executable JAR with jar -xf myapp.jar as documented here
  • Run the java command with -Dspring.aot.enabled=true, for example java -Dspring.aot.enabled=true -cp BOOT-INF/classes:BOOT-INF/lib/* com.example.MyApplication

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.