01.Basic Structure
Ctrl+Shift+T
package - com..sbbasiccourse
02.How to Change Port and contextPath
application.properties
Now URL : localhost:9090/springbootserver.port = 9090server.context-path = /springboot
03.Devtools Dependencies for auto restart server
<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-devtools</artifactId><scope>runtime</scope></dependency>
04.Add to Controller
package com.sbbasiccourse.controller;Now run and call URL - localhost:9090/springboot@RestControllerpublic class WelcomeController {@RequestMapping(name="/")public String index(){return "Spring Boot Basic Course";}}
05.Default API calling
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency>
And you have to add application.properties
management.security.enabled=false
06.Default API calling
No comments:
Post a Comment