SpringBoot to Micronaut® framework - Application Class

SpringBoot and Micronaut applications contain a simple application class which starts the application for you.

SpringBoot:

package scorekeep;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class Application {

	public static void main(String[] args) {
		SpringApplication.run(Application.class, args);
	}
}

Micronaut® framework:

package scorekeep;

import io.micronaut.runtime.Micronaut;

public class Application {

	public static void main(String[] args) {
		Micronaut.run(Application.class, args);
	}
}

Except for the @SpringBootApplication annotation both classes are almost identical.

Micronaut® is a registered trademark of Object Computing, Inc. Use is for referential purposes and does not imply any endorsement or affiliation with any third-party product. Unauthorized use is strictly prohibited.

Tags: #micronaut #springboot
Apr 2021, 27.

 

My next events:
🗓 Oct 05 17:00 Jumpstart your Java applications with AWS Lambda and Micronaut