Posts

Showing posts from February, 2022

Adding Spring boot application as a dependency to another spring boot application

 The Spring Boot Maven and Gradle plugins both package our application as executable JARs – such a file can't be used in another project since class files are put into BOOT-INF/classes . This is not a bug, but a feature. In order to share classes with another project, the best approach to take is to create a separate jar containing shared classes , then make it a dependency of all modules that rely on them. But if that isn't possible, we can configure the plugin to generate a separate jar that can be used as a dependency. Suppose we have two projects 1- general_definitions_app 2- cutstomer_service_app we want to add "general_definitions_app" as a dependency to "cutstomer_service_app"  Steps: 1- open  general_definitions_app , then open the pom.xml file 2- serach for the plugin "spring-boot-maven-plugin" and modify it to be  <build>         <plugins>             <plugin>                 <groupId>org.springframework.boot</

How to open ports on ubuntu server on OCI

 I got issue to telnet my server on port 9090  after I issued these commands on the server, the problem solved iptables -I INPUT -p tcp -m tcp --dport 9090 -j ACCEPT iptables -I INPUT -p tcp -m tcp --dport 9092 -j ACCEPT  

How to install JDK 14 on ubuntu 18

  wget https: //download.java.net/openjdk/jdk14/ri/openjdk-14+36_linux-x64_bin.tar.gz tar xvfz openjdk- 14 +36_linux-x64_bin.tar.gz mv ./jdk- 14 / /usr/lib/jvm/ update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk-14/bin/javac" 1081 update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk-14/bin/java" 1081 update-alternatives --set "javac" "/usr/lib/jvm/jdk-14/bin/javac" update-alternatives --set "java" "/usr/lib/jvm/jdk-14/bin/java" update-alternatives --config java