Guides: https://spring.io/guides
Spring initializer: https://start.spring.io/
Docs: https://docs.spring.io/
HttpStatus Status values
JDBC - Java Database Connectivity
Spring initializer: https://start.spring.io/
Docs: https://docs.spring.io/
HttpStatus Status values
REST - Representational State Transfer
DAO - Data access object (ryšys su duombaze)
DAO - Data access object (ryšys su duombaze)
model?
JSON - Javascript Object Notation
JSON - Javascript Object Notation
POJOS - Plain Old Java Objects
JAR - Java Archive
JAR - Java Archive
ORM - Object relation mapping
ODBC - Object Database ConnectivityJDBC - Java Database Connectivity
@RestController = @Controller + @ResponseBody
@Service or @Component or @Repository
Running with maven
$ mvn clean package
$ mvn spring-boot:run
$ mvn clean
$ mvn install #target direktorijoje atsiras .jar failiukas
Autowiring@Autowired
$ mvn spring-boot:run
$ mvn clean
$ mvn install #target direktorijoje atsiras .jar failiukas
Autowiring@Autowired
GET
@GetMapping@RequestMapping(method = RequestMethod.GET)
@GetMapping(path="/hello")
@RequestMapping(method = RequestMethod.GET, path="/hello"))
@GetMapping(path="/{name}")
public String getName(@PathVariable String name)
POST
@PostMapping()@RequestMapping(method = RequestMethod.POST)
@ResponseStatus(HttpStatus.CREATED)
DELETE
@DeleteMapping(path = "/{username}")@RequestMapping(path = "/{username}", method = RequestMethod.DELETE)
public void deleteUser(@PathVariable final String username) {}
application.properies
logging.level.org.springframework.web: DEBUG
logging.level.org.springframework: DEBUG
server.port=9090
spring.jackson.serialization.write-dates-as-timestamps=false
logging.level.org.springframework: DEBUG
server.port=9090
spring.jackson.serialization.write-dates-as-timestamps=false