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