如何使用spring boot java将数据读入和写入hbase,这是我的代码。如何使用application.properties将hadoop属性配置到我的api中?
@Controller
@ComponentScan(basePackages = "com.eyedentify.*")
@SpringBootApplication
public class SampleHadoopApplication{
public static void main(String[] args) {
SpringApplication.run(SampleHadoopApplication.class, args);
}
@RequestMapping(value="/")
@ResponseBody
public String home() {
return "Hello !!...";
}
@Controller
@RequestMapping(value = "/sample")
@Api(value = "Eye-SampleController", tags = "Eyedentify API")
public class SampleController {
@RequestMapping(value = "/test", method = RequestMethod.GET)
@ResponseBody
public String sample() {
return "eydentify sample is Up !!";
}
/*
* @RequestMapping(value="/")
*
* @ResponseBody public String home() { return "Hello MMBit"; }
*/
@RequestMapping(value = "/hi", method = RequestMethod.GET)
@ResponseBody
public String getHello() {
return "Hello image Api is working";
}
===============================
application.properties
spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
server.port=9090
如何配置Hbase驱动程序以及如何与DB建立通信以及如何执行crud操作?