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.audelia.springdemo.Controller; | |
import org.springframework.web.bind.annotation.GetMapping; | |
import org.springframework.web.bind.annotation.RequestMapping; | |
import org.springframework.web.bind.annotation.RestController; | |
@RestController | |
@RequestMapping("/end") |
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.audelia.first.controlers; | |
import com.audelia.first.Domain.UserDTO; | |
import com.audelia.first.Services.UserServices; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.web.bind.annotation.*; | |
import java.util.List; | |
@RestController |
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.audelia.first.Domain; | |
import javax.persistence.*; | |
@Entity | |
@Table(name = "user") | |
public class UserDTO { | |
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.audelia.first.Services; | |
import com.audelia.first.Domain.UserDTO; | |
import java.util.List; | |
public interface UserServices { | |
List<UserDTO> findAllUsers(); |
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.audelia.first.Services.impl; | |
import com.audelia.first.Domain.UserDTO; | |
import com.audelia.first.Repositories.UserRepository; | |
import com.audelia.first.Services.UserServices; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.stereotype.Service; | |
import java.util.List; |
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.audelia.first.Repositories; | |
import com.audelia.first.Domain.UserDTO; | |
import org.springframework.data.jpa.repository.JpaRepository; | |
public interface UserRepository extends JpaRepository<UserDTO,Integer> { | |
} |
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 Parent{ | |
public void m1() { | |
System.out.println("parent"); | |
} | |
} | |
class Child extends Parent{ | |
public void m2(){ | |
System.out.println("child"); | |
} |
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.poly.overriding; | |
public interface Shape { | |
public void draw(); | |
} |
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.poly.overriding; | |
public class Circle implements Shape{ | |
@Override | |
public void draw(){ | |
System.out.println("Drwaing circle"); | |
} |
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.poly.overriding; | |
public class Square implements Shape { | |
@Override | |
public void draw() { | |
System.out.println("Drawing Square"); | |
} |
OlderNewer