This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"user": { | |
"data": [ | |
{ | |
"id": "119bbacd-9c03-4044-867f-4c26e8f715f6", | |
"firstName": "Arthur", | |
"lastName": "Portas", | |
"email": "arthurportas[AT]gmail.com", | |
"lastUpdated": { | |
"$date": "2017-01-24T10:09:15.210Z" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.arthurportas.mongodb.example.config; | |
import com.github.fakemongo.Fongo; | |
import com.mongodb.Mongo; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.ComponentScan; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.data.mongodb.config.AbstractMongoConfiguration; | |
import org.springframework.data.mongodb.repository.config.EnableMongoRepositories; | |
import org.springframework.scheduling.annotation.EnableScheduling; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.arthurportas.repository; | |
import com.arthurportas.mongodb.example.repository.UserRepository; | |
import com.fasterxml.jackson.databind.util.ISO8601DateFormat; | |
import com.lordofthejars.nosqlunit.annotation.UsingDataSet; | |
import com.lordofthejars.nosqlunit.core.LoadStrategyEnum; | |
import com.lordofthejars.nosqlunit.mongodb.InMemoryMongoDb; | |
import com.lordofthejars.nosqlunit.mongodb.MongoDbRule; | |
import org.junit.Before; | |
import org.junit.ClassRule; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.arthurportas.presentation.servlets; | |
import com.arthurportas.entities.Employee; | |
import com.arthurportas.services.EmployeeService; | |
import javax.servlet.ServletException; | |
import javax.servlet.annotation.WebServlet; | |
import javax.servlet.http.HttpServlet; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>::StaffGest:: - new-employee</title> | |
<meta name="description" content="StaffGest:: - search-employee"> | |
<meta name="author" content="Arthur Portas"> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false"%> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<title>New Employee</title> | |
</head> | |
<body> | |
Employee created with success! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>::StaffGest:: - search-employee</title> | |
<meta name="description" content="StaffGest:: - search-employee"> | |
<meta name="author" content="Arthur Portas"> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false"%> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<title>Search Employee</title> | |
</head> | |
<body> | |
Search results: ${emp} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee | |
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" | |
version="3.1"> | |
<welcome-file-list> | |
<welcome-file>new-employee.xhtml</welcome-file> | |
</welcome-file-list> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.arthurportas.presentation.backingbeans; | |
import com.arthurportas.entities.Employee; | |
import com.arthurportas.services.EmployeeService; | |
import javax.faces.bean.ManagedBean; | |
import javax.faces.bean.RequestScoped; | |
import javax.faces.bean.SessionScoped; | |
import java.io.Serializable; |