Table of Contents
This Demo API is intended to make it easy for you to understand how to use Spring REST Docs to produce high-quality documentation for your RESTful services.
# Completed steps: https://askubuntu.com/questions/1196706/ubuntu-18-04-fail-to-load-intel-9560-wireless-firmware | |
cd ~/backport-iwlwifi/ | |
make defconfig-iwlwifi-public | |
sed -i 's/CPTCFG_IWLMVM_VENDOR_CMDS=y/# CPTCFG_IWLMVM_VENDOR_CMDS is not set/' .config | |
make -j4 | |
sudo make install | |
sudo modprobe iwlwifi |
import java.util.Scanner; | |
/* | |
Problem: | |
https://www.hackerrank.com/contests/dstest-1/challenges/character-game | |
*/ | |
public class Solution { | |
private static final Scanner scanner = new Scanner(System.in); |
for i in `seq 1 20`; do curl -o /dev/null --silent --head --write-out '%{http_code}\n' "https://google.com.br"; done |
-- consulta de eventos | |
kubectl get events --sort-by='.lastTimestamp' | |
-- consulta de flavor de namespace | |
kubectl describe ns | |
-- atualizando o namespace de contexto | |
kubectl config set-context development-br-sp1-a --namespace=pp-oauth-hub | |
-- consultando o nome do contexto atual |
This Demo API is intended to make it easy for you to understand how to use Spring REST Docs to produce high-quality documentation for your RESTful services.
package com.example.demoapi.products | |
import com.fasterxml.jackson.databind.ObjectMapper | |
import org.junit.Before | |
import org.junit.Rule | |
import org.junit.Test | |
import org.junit.runner.RunWith | |
import org.mockito.Mockito.`when` | |
import org.mockito.MockitoAnnotations | |
import org.springframework.beans.factory.annotation.Autowired |
<plugin> | |
<artifactId>maven-resources-plugin</artifactId> | |
<version>2.7</version> | |
<executions> | |
<execution> | |
<id>copy-resources</id> | |
<phase>prepare-package</phase> | |
<goals> | |
<goal>copy-resources</goal> | |
</goals> |
package com.example.demoapi.products | |
import org.springframework.stereotype.Service | |
@Service | |
class ProductsService { | |
fun create(product: Product): Product = product | |
fun list(): List<Product> { |
package com.example.demoapi.products | |
import org.springframework.http.ResponseEntity | |
import org.springframework.web.bind.annotation.* | |
import org.springframework.web.servlet.support.ServletUriComponentsBuilder | |
import java.net.URI | |
@RequestMapping("/products") | |
@RestController | |
class ProductsController(private val service: ProductsService) { |
<plugin> | |
<groupId>org.asciidoctor</groupId> | |
<artifactId>asciidoctor-maven-plugin</artifactId> | |
<version>1.5.6</version> | |
<executions> | |
<execution> | |
<id>generate-docs</id> | |
<phase>prepare-package</phase> | |
<goals> | |
<goal>process-asciidoc</goal> |