首页>代码>spring boot+redis实现共享java servlet session对象>/springboot-session-redis/src/main/java/com/singhand/Application.java
package com.singhand;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.embedded.ConfigurableEmbeddedServletContainer;
import org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;

@EnableAutoConfiguration
// 指定扫描包
@ComponentScan(basePackages = { "com.singhand.controller" })
@SpringBootApplication
public class Application extends SpringBootServletInitializer implements EmbeddedServletContainerCustomizer {

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

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

	public void customize(ConfigurableEmbeddedServletContainer configurableEmbeddedServletContainer) {
		// configurableEmbeddedServletContainer.setPort(9090);
	}
}
最近下载更多
zhijian992714  LV6 2021年8月29日
whfuai  LV14 2021年7月28日
与你同行2019  LV11 2021年2月26日
562650727  LV10 2021年2月24日
北京时间五点整  LV9 2020年7月24日
812795769  LV15 2020年4月10日
鬼燎孙  LV6 2020年4月1日
skipple3  LV39 2020年2月26日
1371118944  LV9 2019年10月16日
0312wangchen  LV26 2019年9月16日
最近浏览更多
是一个鸽子啊  LV17 2023年6月14日
jiaoyinbo  LV1 2023年2月27日
cmycmycmy  LV1 2023年1月11日
JiangYing009  LV7 2022年12月29日
兰文斌  LV6 2022年3月9日
welcome丶  LV8 2021年9月22日
zhijian992714  LV6 2021年8月29日
whfuai  LV14 2021年7月28日
huangxiaoke20  LV17 2021年7月25日
锐vi123  LV11 2021年5月7日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友