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
global | |
log 127.0.0.1 local0 | |
log 127.0.0.1 local1 notice | |
#Adds a global syslog server. Up to two global servers can be defined. They | |
#will receive logs for startups and exits, as well as all logs from proxies | |
#configured with "log global". An optional level can be specified to filter | |
#outgoing messages. By default, all messages are sent. | |
#An IPv4 address optionally followed by a colon and a UDP port. If | |
#no port is specified, 514 is used by default (the standard syslog port). |
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 org.krams.repository; | |
import org.krams.domain.User; | |
import org.springframework.data.domain.Page; | |
import org.springframework.data.domain.Pageable; | |
import org.springframework.data.jpa.repository.JpaRepository; | |
import org.springframework.data.jpa.repository.Query; | |
import org.springframework.data.repository.query.Param; | |
public interface UserRepository extends JpaRepository<User, Long> { |
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 org.krams.config; | |
import javax.sql.DataSource; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.core.env.Environment; | |
import org.springframework.data.jpa.repository.config.EnableJpaRepositories; | |
import org.springframework.orm.jpa.JpaTransactionManager; |
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
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> | |
<c:url value="/upload/message" var="messageUploadUrl"/> | |
<c:url value="/upload/file" var="fileUploadUrl"/> | |
<html> | |
<head> | |
<link rel="stylesheet" type="text/css" media="screen" href='<c:url value="/resources/css/jquery-ui/pepper-grinder/jquery-ui-1.8.16.custom.css"/>'/> | |
<link rel="stylesheet" type="text/css" media="screen" href='<c:url value="/resources/css/style.css"/>'/> | |
<script type='text/javascript' src='<c:url value="/resources/js/jquery-1.6.4.min.js"/>'></script> |
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
# Custom log facilities for haproxy | |
local0.* /var/log/haproxy0a.log | |
local1.* /var/log/haproxy1a.log | |
$ModLoad imudp | |
# load the imudp module for rsyslog | |
# provides UDP syslog reception | |
# start UDP server on this port, "*" means all addresses | |
$UDPServerRun 514 |
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 org.krams.controller; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.social.connect.ConnectionRepository; | |
import org.springframework.social.connect.NotConnectedException; | |
import org.springframework.social.facebook.api.Facebook; | |
import org.springframework.stereotype.Controller; | |
import org.springframework.web.bind.annotation.ModelAttribute; | |
import org.springframework.web.bind.annotation.RequestMapping; | |
import org.springframework.web.bind.annotation.RequestMethod; |
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
<form action="#" th:action="@{/users/create}" th:object="${commanduser}" method="post"> | |
.... | |
<tr> | |
<td><input type="text" hidden="hidden" th:field="*{id}"/> | |
<input type="text" th:field="*{firstName}"/></td> | |
<td><input type="text" th:field="*{lastName}"/></td> | |
<td><input type="text" th:field="*{username}"/></td> | |
<td><select th:field="*{role}"> | |
<option th:each="role : ${allRoles}" th:value="${role}" | |
th:text="#{${'user.role.' + role}}">Access Type 1</option> |
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 org.krams.response; | |
import java.io.Serializable; | |
public class UserDto implements Serializable { | |
private Long id; | |
private String firstName; | |
private String lastName; | |
private String username; |
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
@Controller | |
@RequestMapping("/users") | |
public class UserController { | |
@RequestMapping | |
public String getUsersPage(ModelMap model) { | |
Pageable pageRequest = new PageRequest(0, 10); | |
Page<User> users = repository.findAll(pageRequest); | |
model.addAttribute("users", UserMapper.map(users)); | |
model.addAttribute("commanduser", new UserDto()); |
NewerOlder