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.

My next events:
🗓 May 27 09:00 AWS Dublin - Micronaut and AWS Lambda
🗓 Jul 20 09:00 Workshop Security in the Micronaut Framework
🗓 Sep 20 09:00 JCON Online 2022 - Getting Started with the Micronaut Framework
🗓 Sep 23 09:00 JCON Online 2022 - Micronaut® Framework and Microstream Java-native persistence engine

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.