Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,26 @@
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


import br.com.entra21.teamroxo.TMSProject.interfaces.AboutUsRepository;
import br.com.entra21.teamroxo.TMSProject.template.AboutUs;


public class AbouUsController {



@RestController
@CrossOrigin(origins = "*")
@RequestMapping("/aboutus")
public class AboutUsControllers {
public class AboutUsController {

@Autowired
private AboutUs aboutUs;
private AboutUsRepository aboutUsRepository;

@GetMapping()
public List<AboutUs> listAboutUs(){
return aboutUs.findAll() ;
return aboutUsRepository.findAll() ;

}

}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package br.com.entra21.teamroxo.TMSProject.interfaces;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import br.com.entra21.teamroxo.TMSProject.template.AboutUs;
import br.com.entra21.teamroxo.TMSProject.template.Carriers;


@Repository
@EnableJpaRepositories
public interface AboutUsRepository extends JpaRepository<AboutUs, String>{

@Query("FROM AboutUs")
public void AboutUs();

}


Loading