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
import io.micrometer.context.ContextRegistry; | |
import lombok.extern.slf4j.Slf4j; | |
import org.jetbrains.annotations.NotNull; | |
import org.slf4j.MDC; | |
import org.springframework.graphql.server.WebGraphQlInterceptor; | |
import org.springframework.graphql.server.WebGraphQlRequest; | |
import org.springframework.graphql.server.WebGraphQlResponse; | |
import org.springframework.stereotype.Component; | |
import reactor.core.publisher.Mono; | |
import reactor.util.context.Context; |
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 class Test { | |
private static Object object = new Object(); | |
//private static AtomicBoolean isOddTurn = new AtomicBoolean(true); | |
private volatile Boolean isOddTurn = Boolean.TRUE; | |
public static void main(String[] args) { | |
Test test = new Test(); | |
test.runDemo(); |
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
<parent> | |
<groupId>org.springframework.boot</groupId> | |
<artifactId>spring-boot-starter-parent</artifactId> | |
<version>2.7.6</version> | |
<relativePath /> <!-- lookup parent from repository --> | |
</parent> | |
<groupId>com.github</groupId> | |
<artifactId>ldap-service</artifactId> | |
<version>1.0.0</version> | |
<name>ldap-service</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
QRoles userRolesPath = QRoles.roles1; | |
BooleanExpression exp = Expressions | |
.booleanTemplate("json_contains_key({0}, {1})", userRolesPath.roles, Expressions.constant(role)) | |
.isTrue(); | |
Iterable<Roles> lr = rr.findAll(exp); |
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 class SQLFunctionContributor implements MetadataBuilderContributor { | |
@Override | |
public void contribute(MetadataBuilder metadataBuilder) { | |
metadataBuilder.applySqlFunction("json_contains_key", | |
new SQLFunctionTemplate(BooleanType.INSTANCE, "JSON_CONTAINS(?1, JSON_QUOTE(?2))")); | |
} | |
} |
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
------------------------------------- | |
Translated Report (Full Report Below) | |
------------------------------------- | |
Process: SpringToolSuite4 [83191] | |
Path: /Applications/SpringToolSuite4.app/Contents/MacOS/SpringToolSuite4 | |
Identifier: org.springframework.boot.ide.branding.sts4 | |
Version: 4.16.1 (4.16.1.202210240748) | |
Code Type: X86-64 (Native) | |
Parent Process: launchd [1] |
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
<layers xmlns="http://www.springframework.org/schema/boot/layers" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/boot/layers | |
https://www.springframework.org/schema/boot/layers/layers-2.7.xsd"> | |
<application> | |
<into layer="spring-boot-loader"> | |
<include>org/springframework/boot/loader/**</include> | |
</into> | |
<into layer="application" /> | |
</application> | |
<dependencies> | |
<into layer="snapshot-dependencies"> |
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
#Multi Stage Docker Build | |
#STAGE 1 - Build the layered jar | |
#Use Maven base image | |
FROM maven-3.8.3-openjdk-17 AS builder | |
COPY src /home/app/src | |
COPY pom.xml /home/app | |
#Build an uber jar | |
RUN mvn -f /home/app/pom.xml package | |
WORKDIR /home/app/target |
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
@RestController | |
@RequestMapping("/api/opportunity") | |
@Validated | |
public class OpportunityController { | |
@GetMapping("/vendors/list") | |
public String getVendorpage(@RequestParam(required = false) String term, | |
@RequestParam(required = false) Integer page, @RequestParam(required = false) Integer size, | |
@ValuesAllowed(propName = "orderBy", values = { "OpportunityCount", "OpportunityPublishedCount", "ApplicationCount", | |
"ApplicationsApprovedCount" }) @RequestParam(required = false) String orderBy, @RequestParam(required = false) String sortDir) { | |
return "success"; |
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
import java.lang.annotation.Retention; | |
import java.lang.annotation.RetentionPolicy; | |
import java.util.Arrays; | |
import java.util.List; | |
import javax.validation.Constraint; | |
import javax.validation.ConstraintValidator; | |
import javax.validation.ConstraintValidatorContext; | |
import javax.validation.Payload; |
NewerOlder