This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<code_scheme name="spring-framework"> | |
<option name="OTHER_INDENT_OPTIONS"> | |
<value> | |
<option name="INDENT_SIZE" value="4" /> | |
<option name="CONTINUATION_INDENT_SIZE" value="8" /> | |
<option name="TAB_SIZE" value="4" /> | |
<option name="USE_TAB_CHARACTER" value="true" /> | |
<option name="SMART_TABS" value="false" /> | |
<option name="LABEL_INDENT_SIZE" value="0" /> |
This file contains hidden or 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
public static Set getAllByClass(Class clazz) { | |
return new HashSet<>(Arrays.asList(clazz.getEnumConstants())); | |
} |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" version="1.7"> | |
<xs:element name="ehcache"> | |
<xs:complexType> | |
<xs:sequence> | |
<xs:element maxOccurs="1" minOccurs="0" ref="diskStore"/> | |
<xs:element maxOccurs="1" minOccurs="0" ref="sizeOfPolicy"/> | |
<xs:element maxOccurs="1" minOccurs="0" ref="transactionManagerLookup"/> | |
<xs:element maxOccurs="1" minOccurs="0" ref="cacheManagerEventListenerFactory"/> |
This file contains hidden or 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
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>$group$</groupId> | |
<artifactId>$artifact$</artifactId> | |
<packaging>war</packaging> | |
<version>1.0-SNAPSHOT</version> | |
<name>$name$</name> |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence" version="2.1"> | |
<persistence-unit name="PersistenceDefault"> | |
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider> | |
<class>br.com.cheetahracing.warehouse.entity.Car</class> | |
<class>br.com.cheetahracing.warehouse.entity.Tool</class> | |
<class>br.com.cheetahracing.warehouse.entity.PartAssignment</class> | |
<class>br.com.cheetahracing.warehouse.entity.Part</class> | |
<class>br.com.cheetahracing.warehouse.entity.Storage</class> |
This file contains hidden or 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
<!--suppress ALL --> | |
<configuration scan="true"> | |
<!-- | |
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> | |
<file>logs/mylog.log</file> | |
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> | |
<fileNamePattern>logs/mylog.%i.log.zip</fileNamePattern> | |
<minIndex>1</minIndex> | |
<maxIndex>3</maxIndex> | |
</rollingPolicy> |
This file contains hidden or 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:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns="http://xmlns.jcp.org/xml/ns/javaee" | |
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee | |
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" | |
version="3.1"> | |
<display-name>Spring MVC Application</display-name> | |
<!-- Configure ContextLoaderListener to use AnnotationConfigWebApplicationContext | |
instead of the default XmlWebApplicationContext --> | |
<context-param> |
This file contains hidden or 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
<c:set var="firstUrl" value="${pageContext.request.contextPath}/warehouse/parts"/> | |
<c:set var="lastUrl" value="${pageContext.request.contextPath}/warehouse/parts?page=${totalPages - 1}"/> | |
<c:set var="prevUrl" value="${pageContext.request.contextPath}/warehouse/parts?page=${currentIndex - 1}"/> | |
<c:set var="nextUrl" value="${pageContext.request.contextPath}/warehouse/parts?page=${currentIndex + 1}"/> | |
<div class="pagination"> | |
<ul class="pagination pagination-sm"> | |
<c:choose> | |
<c:when test="${currentIndex == 1}"> | |
<li class="disabled"><a href="#"><<</a></li> |
This file contains hidden or 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
#!/bin/bash | |
# Update System | |
# Install prerequisites | |
echo 'Installing prerequisites...' | |
sudo apt-get install -y curl | |
sudo apt-get install -y autoconf | |
sudo apt-get install -y bison | |
sudo apt-get install -y build-essential |
This file contains hidden or 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
@Bean | |
@ConditionalOnMissingBean(RequestInterceptor.class) | |
@ConditionalOnBean(OAuth2ClientContext.class) | |
@ConditionalOnClass({RequestInterceptor.class, Feign.class}) | |
feign.RequestInterceptor requestInterceptor(OAuth2ClientContext context) { | |
if (context == null) return null; | |
return new OAuth2FeignRequestInterceptor(context); | |
} | |
public class OAuth2FeignRequestInterceptor implements RequestInterceptor { |