kandi background
Explore Kits

micronaut-core | Micronaut Application Framework | Serverless library

 by   micronaut-projects Java Version: v3.4.2 License: Apache-2.0

 by   micronaut-projects Java Version: v3.4.2 License: Apache-2.0

Download this library from

kandi X-RAY | micronaut-core Summary

micronaut-core is a Java library typically used in Serverless applications. micronaut-core 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, Maven.
Micronaut Application Framework
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • micronaut-core has a medium active ecosystem.
  • It has 5295 star(s) with 896 fork(s). There are 173 watchers for this library.
  • There were 4 major release(s) in the last 6 months.
  • There are 344 open issues and 2551 have been closed. On average issues are closed in 215 days. There are 43 open pull requests and 0 closed requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of micronaut-core is v3.4.2
micronaut-core Support
Best in #Serverless
Average in #Serverless
micronaut-core Support
Best in #Serverless
Average in #Serverless

quality kandi Quality

  • micronaut-core has 0 bugs and 0 code smells.
micronaut-core Quality
Best in #Serverless
Average in #Serverless
micronaut-core Quality
Best in #Serverless
Average in #Serverless

securitySecurity

  • micronaut-core has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • micronaut-core code analysis shows 0 unresolved vulnerabilities.
  • There are 0 security hotspots that need review.
micronaut-core Security
Best in #Serverless
Average in #Serverless
micronaut-core Security
Best in #Serverless
Average in #Serverless

license License

  • micronaut-core 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.
micronaut-core License
Best in #Serverless
Average in #Serverless
micronaut-core License
Best in #Serverless
Average in #Serverless

buildReuse

  • micronaut-core releases are available to install and integrate.
  • Deployable package is available in Maven.
  • Build file is available. You can build the component from source.
  • Installation instructions are not available. Examples and code snippets are available.
  • It has 167690 lines of code, 16509 functions and 3597 files.
  • It has medium code complexity. Code complexity directly impacts maintainability of the code.
micronaut-core Reuse
Best in #Serverless
Average in #Serverless
micronaut-core Reuse
Best in #Serverless
Average in #Serverless
Top functions reviewed by kandi - BETA

kandi has reviewed micronaut-core and discovered the below as its top functions. This is intended to give you an instant insight into micronaut-core implemented functionality, and help decide if they suit your requirements.

  • Executes the route .
  • Processes the bean definition end .
  • Intercept the client invocation .
  • Gets the list of properties of this class .
  • Validates parameters internal .
  • Generate a method declaration .
  • Apply transformations to the given list .
  • Streams a request through the network .
  • Read an annotation value .
  • Creates the bean .

micronaut-core Key Features

Micronaut Application Framework

Building From Source

copy iconCopydownload iconDownload
./gradlew publishToMavenLocal

Execution optimizations have been disabled for task ':compileGsonViews'

copy iconCopydownload iconDownload
tasks.named('bootWarMainClassName') {
    it.mustRunAfter(tasks.named('compileGsonViews'))
}

how to modify HttpRequest body parameters in a HttpFilter

copy iconCopydownload iconDownload
In Micronaut 2.5 the body will not be read until after filters are executed.
This may lead to cases where the body was available in a filter and is no longer available.

Remove "Expires" HTTP header (for StreamedFiles)

copy iconCopydownload iconDownload
@Singleton
@Replaces(FileTypeHandler.class)
public class CustomFileTypeHandler extends FileTypeHandler {

    public CustomFileTypeHandler(FileTypeHandlerConfiguration configuration) {
        super(configuration);
    }

    @Override
    protected void setDateAndCacheHeaders(MutableHttpResponse response, long lastModified) {
        //do nothing
    }
}

Community Discussions

Trending Discussions on micronaut-core
  • Execution optimizations have been disabled for task ':compileGsonViews'
  • Native image doesn't respect date format with @JsonFormat
  • how to modify HttpRequest body parameters in a HttpFilter
  • Controller with suspend function causing netty.RoutingInBoundHandler - java.lang.NoClassDefFoundError: kotlinx/coroutines/ThreadContextElement
  • Error starting Micronaut server: Bean definition [org.hibernate.SessionFactory] could not be loaded
  • Remove "Expires" HTTP header (for StreamedFiles)
Trending Discussions on micronaut-core

QUESTION

Execution optimizations have been disabled for task ':compileGsonViews'

Asked 2022-Jan-28 at 09:58

We recently upgraded our project from Grails 3 to 5.1.1. Actually, it was not really an upgrade but rather a migration. We ended up creating a fresh project with 5.1.1 and migrated all of our code into it. Everything is currently working with an exception of one warning:

> Task :compileGsonViews
Execution optimizations have been disabled for task ':compileGsonViews' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: '/Users/shurikag/PRIZ/dev/priz-api/build/gson-classes/main'. Reason: Task ':bootWarMainClassName' uses this output of task ':compileGsonViews' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.

And in fact, as our newrelic shows, the app is now extremely slow on gson rendering. Usually the first time an endpoint is called, it is very slow, the subsequent calls are OK.

Is there a solution for it?

Here is our build.gradle:

buildscript {
    repositories {
        maven {
            url "https://repo.grails.org/grails/core"
        }
        maven {
            url "https://repo.grails.org/artifactory/core"
        }
        mavenCentral()
    }
    dependencies {
        classpath "org.grails:grails-gradle-plugin:$grailsGradlePluginVersion"
        classpath "org.grails.plugins:hibernate5:7.2.0"
        classpath "org.grails.plugins:views-gradle:2.1.2"
        classpath "gradle.plugin.com.github.erdi.webdriver-binaries:webdriver-binaries-gradle-plugin:2.6"
        classpath 'org.grails.plugins:database-migration:3.1.0'
    }
}

version "0.1"
group "priz.api"

apply plugin: "eclipse"
apply plugin: "idea"
// apply plugin:"visual-studio"
apply plugin: "war"
apply plugin: "org.grails.grails-web"
apply plugin: "org.grails.plugins.views-json"
apply plugin: "com.github.erdi.webdriver-binaries"

repositories {
    maven {
        url "https://repo.grails.org/grails/core"
    }
    maven {
        url "https://repo.grails.org/artifactory/core"
    }
    mavenCentral()
}

configurations {
    developmentOnly
    runtimeClasspath {
        extendsFrom developmentOnly
    }
}

dependencies {
    implementation platform('com.amazonaws:aws-java-sdk-bom:1.11.1000')
    implementation 'com.amazonaws:aws-java-sdk-s3'
    developmentOnly("org.springframework.boot:spring-boot-devtools")
    compileOnly "io.micronaut:micronaut-inject-groovy"
    // https://mvnrepository.com/artifact/io.micronaut/micronaut-core
    implementation 'io.micronaut:micronaut-core:3.2.6'

    console "org.grails:grails-console"
    implementation "org.springframework.boot:spring-boot-starter-logging:2.6.2"
    implementation "org.springframework.boot:spring-boot-starter-validation:2.6.2"
    implementation "org.springframework.boot:spring-boot-autoconfigure:2.6.2"
    implementation "org.grails:grails-core"
    implementation "org.springframework.boot:spring-boot-starter-actuator:2.6.2"
    implementation "org.springframework.boot:spring-boot-starter-tomcat:2.6.2"
    implementation "org.grails:grails-plugin-url-mappings"
    implementation "org.grails:grails-plugin-rest"
    implementation "org.grails:grails-plugin-codecs"
    implementation "org.grails:grails-plugin-interceptors"
    implementation "org.grails:grails-plugin-services"
    implementation "org.grails:grails-plugin-datasource"
    implementation "org.grails:grails-plugin-databinding"
    implementation "org.grails:grails-web-boot"
    implementation "org.grails:grails-logging"
    implementation "org.grails.plugins:cache"
    implementation "org.grails.plugins:async"
    implementation "org.grails.plugins:events"
    implementation "org.grails.plugins:hibernate5"
    implementation "org.hibernate:hibernate-core:5.6.3.Final"
    implementation 'org.hibernate:hibernate-ehcache:5.6.3.Final'
    implementation "org.grails.plugins:views-json:2.1.2"
    implementation "org.grails.plugins:views-json-templates:2.1.2"
    profile "org.grails.profiles:rest-api"
    runtimeOnly "org.glassfish.web:el-impl:2.2.1-b05"
    runtimeOnly "com.h2database:h2"
    runtimeOnly "org.apache.tomcat:tomcat-jdbc"
    runtimeOnly "javax.xml.bind:jaxb-api:2.3.1"
    testImplementation "io.micronaut:micronaut-inject-groovy"
    testImplementation "org.grails:grails-gorm-testing-support"
    testImplementation "org.mockito:mockito-core"
    testImplementation "io.micronaut:micronaut-http-client"
    testImplementation "org.grails:grails-web-testing-support"
    testImplementation "org.grails:views-json-testing-support"
    testImplementation "org.hibernate.validator:hibernate-validator:6.1.7.Final"
    testImplementation "org.grails.plugins:geb"
    testImplementation "org.seleniumhq.selenium:selenium-remote-driver:4.0.0"
    testImplementation "org.seleniumhq.selenium:selenium-api:4.0.0"
    testImplementation "org.seleniumhq.selenium:selenium-support:4.0.0"
    testRuntimeOnly "org.seleniumhq.selenium:selenium-chrome-driver:4.0.0"
    testRuntimeOnly "org.seleniumhq.selenium:selenium-firefox-driver:4.0.0"
    runtimeOnly "org.grails.plugins:async:4.0.0"

    implementation 'org.grails.plugins:postgresql-extensions:7.0.0'
    implementation "org.postgresql:postgresql:42.3.1"
    implementation 'org.grails.plugins:database-migration:3.1.0'
    implementation 'org.liquibase:liquibase-core:3.10.3'

    implementation "org.grails.plugins:spring-security-core:4.0.3"
    implementation "org.grails.plugins:spring-security-rest:3.0.1"
    implementation 'com.auth0:auth0:1.35.0'
    implementation 'com.auth0:jwks-rsa:0.20.0'

    implementation 'com.sendinblue:sib-api-v3-sdk:5.2.0'

    implementation 'com.papertrailapp:logback-syslog4j:1.0.0'
    implementation "com.stripe:stripe-java:17.11.0"
    implementation "org.grails:grails-datastore-gorm-async"
    implementation 'org.quartz-scheduler:quartz:2.3.2'

    implementation 'com.squareup.okhttp3:okhttp:4.9.3'

    implementation 'co.elastic.clients:elasticsearch-java:7.16.2'
    implementation 'jakarta.json:jakarta.json-api:2.0.1'
    implementation 'com.fasterxml.jackson.core:jackson-databind:2.12.3'
}

sourceSets {
    main {
        resources {
            srcDir 'grails-app/migrations'
        }
    }
}

bootRun {
    ignoreExitValue true
    jvmArgs(
            '-Dspring.output.ansi.enabled=always',
            '-noverify',
            '-XX:TieredStopAtLevel=1',
            '-Xmx1024m')
    sourceResources sourceSets.main
    String springProfilesActive = 'spring.profiles.active'
    systemProperty springProfilesActive, System.getProperty(springProfilesActive)
}

tasks.withType(GroovyCompile) {
    configure(groovyOptions) {
        forkOptions.jvmArgs = ['-Xmx1024m']
    }
}

tasks.withType(Test) {
    useJUnitPlatform()
}

webdriverBinaries {
    chromedriver '2.45.0'
    geckodriver '0.30.0'
}

tasks.withType(Test) {
    systemProperty "geb.env", System.getProperty('geb.env')
    systemProperty "geb.build.reportsDir", reporting.file("geb/integrationTest")
    systemProperty "webdriver.chrome.driver", System.getProperty('webdriver.chrome.driver')
    systemProperty "webdriver.gecko.driver", System.getProperty('webdriver.gecko.driver')
}

UPDATE

Steps to reproduce on a freshly made project

~/PRIZ/dev $ grails -v
| Grails Version: 5.1.1
| JVM Version: 11.0.12
~/PRIZ/dev $ grails create-app myapp --profile=rest-api
| Application created at /Users/shurikag/PRIZ/dev/myapp
~/PRIZ/dev $ cd myapp
~/PRIZ/dev/myapp $ ./gradlew assemble
Starting a Gradle Daemon (subsequent builds will be faster)

> Task :compileGroovy
09:32:41.216 [/127.0.0.1:57662 to /127.0.0.1:57661 workers] DEBUG io.micronaut.core.optim.StaticOptimizations - No optimizations class io.micronaut.core.io.service.SoftServiceLoader$Optimizations found
09:32:41.826 [/127.0.0.1:57662 to /127.0.0.1:57661 workers] DEBUG io.micronaut.core.optim.StaticOptimizations - No optimizations class io.micronaut.core.reflect.ClassUtils$Optimizations found
09:32:42.282 [/127.0.0.1:57662 to /127.0.0.1:57661 workers] DEBUG io.micronaut.core.optim.StaticOptimizations - No optimizations class io.micronaut.core.util.EnvironmentProperties found

> Task :compileGsonViews
Execution optimizations have been disabled for task ':compileGsonViews' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: '/Users/shurikag/PRIZ/dev/myapp/build/gson-classes/main'. Reason: Task ':bootWarMainClassName' uses this output of task ':compileGsonViews' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#implicit_dependency for more details about this problem.
09:32:44.382 [main] DEBUG io.micronaut.core.optim.StaticOptimizations - No optimizations class io.micronaut.core.reflect.ClassUtils$Optimizations found
09:32:44.388 [main] DEBUG io.micronaut.core.optim.StaticOptimizations - No optimizations class io.micronaut.core.util.EnvironmentProperties found
09:32:45.040 [pool-1-thread-2] DEBUG io.micronaut.core.optim.StaticOptimizations - No optimizations class io.micronaut.core.io.service.SoftServiceLoader$Optimizations found

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.2/userguide/command_line_interface.html#sec:command_line_warnings

Execution optimizations have been disabled for 1 invalid unit(s) of work during this build to ensure correctness.
Please consult deprecation warnings for more details.

UPDATE

If I update grailsGradlePluginVersion to 5.1.1 and run the app with grails run-app, I am facing another issue:

| Running application...
<=============> 100% EXECUTING [16s]
> IDLE
Failed to instantiate [ch.qos.logback.classic.LoggerContext]
Reported exception:
ch.qos.logback.core.LogbackException: Unexpected filename extension of file [file:/Users/shurikag/PRIZ/dev/priz-api/grails-app/conf/logback.groovy]. Should be either .groovy or .xml
        at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:67)
        at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:140)
        at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
        at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
        at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
        at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
        at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:417)
        at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:362)
        at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155)
        at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:290)

ANSWER

Answered 2022-Jan-18 at 07:22

I managed to get the error to go away. All I needed to do it all the dependency config for the related tasks (in build.gradle):

tasks.named('bootWarMainClassName') {
    it.mustRunAfter(tasks.named('compileGsonViews'))
}

However, that sis not help the performance :(

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

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

Vulnerabilities

No vulnerabilities reported

Install micronaut-core

You can download it from GitHub, Maven.
You can use micronaut-core like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the micronaut-core component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

Support

If you wish to contribute to the development of Micronaut please read the CONTRIBUTING.md.

DOWNLOAD this Library from

Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

Explore Related Topics

Share this Page

share link
Reuse Pre-built Kits with micronaut-core
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

  • © 2022 Open Weaver Inc.