I want to configure my servlet context, such as setting a custom jsessionId key (see Changing cookie JSESSIONID name)
I believe I can use the SpringBootServletInitializer
when running a WAR file, manipulating the servletContext
in onStartup()
. However, when I run on an embedded application server, using
new SpringApplicationBuilder().run()
, I don't know the best place to manipulate the servlet context.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…