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 edu.wgu.dm.audit.jpa; | |
import java.time.Instant; | |
import java.time.ZoneOffset; | |
import java.util.Calendar; | |
import java.util.GregorianCalendar; | |
import org.springframework.data.auditing.DateTimeProvider; | |
import org.springframework.stereotype.Component; | |
@Component("UtcDateTimeProvider") |
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.amit; | |
import org.apache.commons.lang3.time.StopWatch; | |
import lombok.extern.slf4j.Slf4j; | |
/** | |
* Hello world! | |
* | |
*/ |
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
Stream.of("Bob hit a ball, the hit BALL flew far after it was hit.".split("\\W")) | |
.filter(a->!a.trim() | |
.isEmpty()) | |
.map(a -> a.trim().toLowerCase()) | |
.filter(s ->!s.equals("hit")) | |
.collect(Collectors.groupingBy(Function.identity(),Collectors.counting())) | |
.entrySet() | |
.stream() | |
.max(Comparator.comparing(a->a.getValue())) | |
.get(); |
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 app.service; | |
@Slf4j | |
@Service | |
@RequiredArgsConstructor | |
public class Service { | |
@Autowired |
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
<!-- QueryDSL --> | |
<dependency> | |
<groupId>com.querydsl</groupId> | |
<artifactId>querydsl-apt</artifactId> | |
</dependency> | |
<dependency> | |
<groupId>com.querydsl</groupId> | |
<artifactId>querydsl-core</artifactId> | |
</dependency> |
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
spring.datasource.url=jdbc:mysql://host:3306/dbname?autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull&useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC | |
spring.datasource.username=username | |
spring.datasource.password=password | |
spring.jpa.show-sql=true | |
spring.jpa.properties.hibernate.format_sql=true | |
spring.jpa.generate-ddl=true | |
spring.jpa.hibernate.ddl-auto=none |
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
server.connection-timeout=60000 | |
#https://tomcat.apache.org/tomcat-9.0-doc/config/http.html | |
#server.connectionUploadTimeout=3600000 | |
#server.disableUploadTimeout=false | |
## Access logs | |
server.tomcat.accesslog.enabled=true | |
server.tomcat.accesslog.suffix=.log | |
server.tomcat.accesslog.prefix=access_log |
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
<!-- This Annotation processor plugin is used by QueryDsl --> | |
<plugin> | |
<groupId>com.mysema.maven</groupId> | |
<artifactId>apt-maven-plugin</artifactId> | |
<version>1.1.3</version> | |
<executions> | |
<execution> | |
<goals> | |
<goal>process</goal> | |
</goals> |
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
POSITIVE LOOKAHEAD | |
(?<=e)I.*? --> 'empIloyeeId' --> Matches only 'I' if its preceded by e | |
Negative LookBEHIND | |
(?<!e)I.*? --> 'empIloyeeId' --> Matches only 'I' if its NOT preceded by e |
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
//@formatter:off | |
code that you do not want to format using eclipse | |
// @formatter:on |
NewerOlder