Added Autowired Repositories to Controller
This commit is contained in:
parent
c4e742ecb0
commit
c6a9b77a0a
@ -27,6 +27,9 @@ dependencies {
|
||||
|
||||
//MariaDB
|
||||
implementation 'org.mariadb.jdbc:mariadb-java-client'
|
||||
|
||||
//Thymeleaf
|
||||
compile("org.springframework.boot:spring-boot-starter-thymeleaf")
|
||||
}
|
||||
|
||||
node {
|
||||
|
||||
@ -1,21 +1,21 @@
|
||||
package hhn.labsw.bugageocaching.controller;
|
||||
|
||||
import hhn.labsw.bugageocaching.db.DBConnector;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import hhn.labsw.bugageocaching.repositories.CacheRepository;
|
||||
import hhn.labsw.bugageocaching.repositories.RewardRepository;
|
||||
import hhn.labsw.bugageocaching.repositories.StationRepository;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.DatabaseMetaData;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
||||
@RestController
|
||||
public class Controller {
|
||||
|
||||
@RequestMapping("/")
|
||||
public String test(){
|
||||
@Autowired
|
||||
CacheRepository cacheRepository;
|
||||
|
||||
return "";
|
||||
}
|
||||
@Autowired
|
||||
RewardRepository rewardRepository;
|
||||
|
||||
@Autowired
|
||||
StationRepository stationRepository;
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user