All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.obatis.startup.StartupApplicationRunner Maven / Gradle / Ivy

There is a newer version: 3.0.1-release
Show newest version
package com.obatis.startup;

import com.obatis.config.response.ResponseResultHandleFactory;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter;

import javax.annotation.Resource;

@Configuration
@Order(1)
public class StartupApplicationRunner extends SpringApplication implements ApplicationRunner  {

	@Resource
	private RequestMappingHandlerAdapter requestMappingHandlerAdapter;

	/**
	 * 该方法在项目启动时运行
	 */
	@Override
	public void run(ApplicationArguments args) {
		// 加载返回封装
		ResponseResultHandleFactory.handleResponseResultInfo(requestMappingHandlerAdapter);
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy