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