Skip to content

Instantly share code, notes, and snippets.

View m-tilab's full-sized avatar
🎯
Focusing

Mahdi Tilab m-tilab

🎯
Focusing
View GitHub Profile
@m-tilab
m-tilab / shell.sh
Created September 30, 2024 09:26
execute the gradle dependencyCheckAnalyze
./gradlew dependencyCheckAnalyze
@m-tilab
m-tilab / pom.xml
Created September 30, 2024 08:42
Maven Owasp dependency Check
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>$pluginVersion</version>
<configuration>
<failBuildOnCVSS>8</failBuildOnCVSS>
</configuration>
<executions>
<execution>
<goals>
@m-tilab
m-tilab / build.gradle
Last active September 30, 2024 08:39
Owasp dependency check plugin
buildscript {
 repositories {
 mavenCentral()
 }
 dependencies {
 classpath 'org.owasp:dependency-check-gradle:{Plugin-version}'
 }
}
apply plugin: 'org.owasp.dependencycheck'
java -jar \
target/Distributed-Service-0.0.1-SNAPSHOT.jar \
--spring.application.name=Service-1 \
--server.port=8080
java -jar \
target/Distributed-Service-0.0.1-SNAPSHOT.jar \
--spring.application.name=Service-2 \
--server.port=8090
opentracing:
jaeger:
http-sender:
url: http://localhost:14268/api/traces
version: '3.3'
services:
jaeger-allinone:
image: jaegertracing/all-in-one:1.42
ports:
- 6831:6831/udp
- 6832:6832/udp
- 16686:16686
- 14268:14268
@RestController
@RequestMapping("/service")
public class Controller {
private static final Logger logger = LoggerFactory.getLogger(Controller.class);
private RestTemplate restTemplate;
@Value("${spring.application.name}")
private String applicationName;
implementation group: 'io.opentracing.contrib', name: 'opentracing-spring-jaeger-cloud-starter', version: '3.3.1'
implementation('io.projectreactor:reactor-core') {
version {
strictly '3.4.26'
}
}
<dependency>
<groupId>io.opentracing.contrib</groupId>
<artifactId>opentracing-spring-jaeger-cloud-starter</artifactId>
<version>3.3.1</version>
<exclusions>
<exclusion>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-core</artifactId>
</exclusion>
</exclusions>
<dependency>
<groupId>io.opentracing.contrib</groupId>
<artifactId>opentracing-spring-jaeger-cloud-starter</artifactId>
<version>3.3.1</version>
</dependency>