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
<dependency> | |
<groupId>io.springfox</groupId> | |
<artifactId>springfox-swagger2</artifactId> | |
<version>2.4.0</version> | |
</dependency> | |
<dependency> | |
<groupId>io.springfox</groupId> | |
<artifactId>springfox-swagger-ui</artifactId> | |
<version>2.4.0</version> |
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.learning.app.config; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import springfox.documentation.spi.DocumentationType; | |
import springfox.documentation.spring.web.plugins.Docket; | |
import springfox.documentation.swagger2.annotations.EnableSwagger2; | |
@Configuration | |
@EnableSwagger2 |
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
abstract class Building { | |
abstract void makeFoundation(); | |
abstract void makeWalls(); | |
abstract void makeRoof(); | |
public final void build(){ | |
makeFoundation(); | |
makeWalls(); | |
makeRoof(); |
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
//Parent class | |
class Parent { | |
public void eat(){ | |
System.out.println("Parent - eat()"); | |
} | |
} | |
//Child class | |
class Child extends Parent { |
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
class Animal{ | |
public void eat(){ | |
System.out.println("Eat method"); | |
} | |
public void eat(int quantity){ | |
System.out.println("Eat method with quantity"); | |
} | |
} |
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
#!/bin/bash | |
# Delete files | |
#file path for logs | |
file_path='/opt/tomcat/logs/'; | |
#file path for eventspace default log | |
file_path_myApp='/opt/tomcat/logs/myApp/'; | |
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.app; | |
public class Application { | |
public static void main(String[] args){ | |
Thread t1 = new Thread(new ThreadOne()); | |
Thread t2 = new Thread(new ThreadTwo()); | |
t1.start(); | |
t2.start(); |
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.app.threads; | |
public class ThreadClose extends Thread { | |
private volatile boolean stop = false; | |
public void run() { | |
while(!stop){ | |
System.out.println("Hi"); | |
closeThread(); |
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.app.superDemo; | |
public class Application { | |
public static void main(String[] args) { | |
Child child = new Child(); | |
System.out.println(child.showMessage()); | |
} | |
} |
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.app.superDemo; | |
public class Application { | |
public static void main(String[] args) { | |
new Child(); | |
} | |
} |