← 返回首页
spring-boot-tutorials/setting-context-path at develop · StackTipsLab/spring-boot-tutorials · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

Latest commit

 

History

History
 
 
 develop
Top

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
View all files

readme.md

Add Context Path to a Spring Boot Application

In a Spring Boot application, the context path represents the base URL for accessing your application. By default, it's set to '/',

To change the context path, you need to add the following property to your application.properties file.

server.servlet.context-path=/api/1.0

Alternatively, if you're using the application.yaml file, you can do this

server: servlet: context-path: '/api/1.0'

Read full article here

Related topics:

Footer

© 2026 GitHub, Inc.