Skip to content

Latest commit

 

History

History

setting-context-path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

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: