Spring Boot Tutorial 2020 | Change Servlet Context Path

preview_player
Показать описание
Congratz! You have built and deployed your first ever SpringBoot web application in your life! What an accomplishment! Kudos to you! 🍺

You scratch your head and you ask yourself a series of questions. What the heck is servlet context path? Why do I need to change it? And most importantly how to change it?

Well, don't waste your time trying to find these answers yourself. Grab a coffee, sit tight, and watch today's video all the way to the end. All your questions are answered in one go! 👏🏻🤓

Other places to find me:
⭐ Facebook: @fullstackalley
⭐ Twitter: @jasper_zs

#contextpath #springbootcontextpath
Рекомендации по теме
Комментарии
Автор

That was an amazing video - thumbs up. Just edit out the misspelled parts. For some reason the application.properties does not work for me. Under the covers, I can see that Spring Boot uses Netty, and not Tomcat. Maybe that is why. My Spring Boot version is 2.6.4

georgesmith
Автор

There are many articles on the Internet about how to change the servlet context path.

Today, while examining the codes in a legacy project, I saw that the following definition was made in the application.yaml

server:
servlet:
context-path: /v1


Frankly, I was wondering. Why would we want to change the servlet context path?

oguzhan_cevik
Автор

It can also be changed in tomcat server.xml and others ways offered by tomcat or in OS env variables

mysocial