Q:

How to deploy SpringBoot Application on Weblogic application server?

I have created a SpringBoot Application. 
I want to deploy this on my local Server (Weblogic 12c).
When I try to deploy the war, I get this error message:
java.lang.IllegalArgumentException: Invalid source type class my.company.MySpringBootApplication
This is my incriminated class:
package my.company;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;

@SpringBootApplication
public class MySpringBootApplication extends SpringBootServletInitializer {

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

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(this);
    }
}

How can I solve this? 
Thanks in advance ;)

A:

It was just a matter of substituting this line:
package my.company;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.web.WebApplicationInitializer;

@ComponentScan
@EnableAutoConfiguration
public class MySpringBootApplication extends SpringBootServletInitializer implements WebApplicationInitializer  {

    @Value("${flag.status}")
    private String flagStatus;

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

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(applicationClass);
    }

    private static Class<MySpringBootApplication > applicationClass = MySpringBootApplication .class;
}

