Skip to content

Instantly share code, notes, and snippets.

View netodevel's full-sized avatar
🏠
Working from home

José Vieira Neto netodevel

🏠
Working from home
  • São Paulo, Brasil
View GitHub Profile
package br.com.sed.seris.scenarios;
import static org.junit.Assert.assertEquals;
import org.junit.Before;
import org.junit.Test;
import br.com.sed.seris.domain.ContaminationScenario;
import br.com.sed.seris.domain.ContaminationSource;
import br.com.sed.seris.domain.ExpositionRoute;
public class OiMundo extends HttpServlet {
protected void service (HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
PrintWriter out = response.getWriter();
// escreve o texto
out.println("<html>");
out.println("<body>");
out.println("Primeira servlet");
<servlet>
<servlet-name>primeiraServlet</servlet-name>
<servlet-class>br.com.caelum.servlet.OiMundo</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>primeiraServlet</servlet-name>
<url-pattern>/oi</url-pattern>
</servlet-mapping>
sudo apt-get update
sudo apt-get install nginx
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
mvn clean package
nohup java -jar SEU-JAR-SNAPSHOT.jar --server.port=8081 &
@netodevel
netodevel / .bashrc
Created September 18, 2016 01:37
.basrch
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# We use preexec and precmd hook functions for Bash
# If you have anything that's using the Debug Trap or PROMPT_COMMAND
# change it to use preexec or precmd
# See also https://github.com/rcaloras/bash-preexec
# If not running interactively, don't do anything
case $- in
class Api::V1::UserController < ApplicationController
def index
@api_v1_users = User.all
render json: @api_v1_users
end
end
###
package com.baeldung.spring.security.x509;
import java.security.Principal;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>