Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Devindi Jayathilaka devindianushika

🎯
Focusing
  • University Of Moratuwa Faculty Of Information Technology
  • Sri lanka
View GitHub Profile
View UserRepository.java
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> {
}
@devindianushika
devindianushika / UserServiceImple.java
Last active Nov 17, 2019
Implementation of services
View UserServiceImple.java
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;
View UserServices.java
package com.audelia.first.Services;
import com.audelia.first.Domain.UserDTO;
import java.util.List;
public interface UserServices {
List<UserDTO> findAllUsers();
View Domain.java
package com.audelia.first.Domain;
import javax.persistence.*;
@Entity
@Table(name = "user")
public class UserDTO {
@devindianushika
devindianushika / controler.java
Last active Nov 17, 2019
Add rest controllers
View controler.java
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
@devindianushika
devindianushika / First.java
Last active Jun 17, 2019
SpringbootFirst
View First.java
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")