Micronautisamodern,JVM-based,fullstackJavaframeworkdesignedforbuildingmodular,easilytestableJVMapplicationswithsupportforJava,KotlinandtheGroovylanguage.
MicronautisdevelopedbythecreatorsoftheGrailsframeworkandtakesinspirationfromlessonslearntovertheyearsbuildingreal-worldapplicationsfrommonolithstomicroservicesusingSpring,SpringBootandGrails.
MicronautaimstoprovideallthetoolsnecessarytobuildJVMapplicationsincluding:
DependencyInjectionandInversionofControl(IoC)AspectOrientedProgramming(AOP)SensibleDefaultsandAuto-ConfigurationWithMicronautyoucanbuildMessage-DrivenApplications,CommandLineApplications,HTTPServersandmorewhilstforMicroservicesinparticularMicronautalsoprovides:
DistributedConfigurationServiceDiscoveryHTTPRoutingClient-SideLoadBalancingAtthesametimeMicronautaimstoavoidthedownsidesofframeworkslikeSpring,SpringBootandGrailsbyproviding:
FaststartuptimeReducedmemoryfootprintMinimaluseofreflectionMinimaluseofproxiesNoruntimebytecodegenerationEasyUnitTestingThisisachievedbypre-computingtheframeworkinfrastructureatcompilationtimewhichreducesthelogicrequiredatruntimefortheapplicationtowork.
FormoreinformationonusingMicronautseethedocumentationatmicronaut.io
ExampleApplicationsExampleMicronautapplicationscanbefoundintheExamplesrepository
BuildingFromSourceTobuildfromsourcecheckoutthecodeandrun:
./gradlewpublishToMavenLocalThiswillpublishthecurrentversiontoyourlocalMavencache.TogettheCLIoperationalyoucando:
exportMICRONAUT_HOME=/path/to/checkoutexportPATH="$PATH:$MICRONAUT_HOME/cli/build/bin"YouwillalsoneedtocheckouttheMicronautProfilesandrun./gradlewpublishToMavenLocaltheretoo.
Youshouldthenbeabletomncreate-apphello-world.
Tobuildthedocumentationrun./gradlewdocs.Thedocumentationisbuilttobuild/docs/index.html.
ContributingCodeIfyouwishtocontributetothedevelopmentofMicronautpleasereadtheCONTRIBUTING.md
VersioningMicronautisusingSemanticVersioning2.0.0.Tounderstandwhatthatmeans,pleaseseethespecificationdocumentation.ExclusionstoMicronaut'spublicAPIincludeanyclassesannotatedwith@Experimentalor@Internal,whichresideintheio.micronaut.core.annotationpackage.
CIGithubActionsareusedtobuildMicronaut.Ifabuildfailsinmaster,checkthetestreports.
评论