Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 06-22-2017 11:23 AM
I am currently trying to build spring boot rest API to insert data into Apache Phoenix.
If I can use JPA to insert data into Phoenix that will be very convenient.
Created 06-22-2017 02:26 PM
Phoenix works with JDBCTemplate and Spring, using the JDBC driver org.apache.phoenix.jdbc.PhoenixDriver. Here is an example spring implementationhttp://blog.csdn.net/eric_sunah/article/details/44494321 with connection pooling (the blog post is in Chinese but it translates well on chrome).
If you are specifically looking for ORM, then you can use https://phoenix.apache.org/phoenix_orm.html
Created 06-22-2017 02:26 PM
Phoenix works with JDBCTemplate and Spring, using the JDBC driver org.apache.phoenix.jdbc.PhoenixDriver. Here is an example spring implementationhttp://blog.csdn.net/eric_sunah/article/details/44494321 with connection pooling (the blog post is in Chinese but it translates well on chrome).
If you are specifically looking for ORM, then you can use https://phoenix.apache.org/phoenix_orm.html
Created 06-22-2017 05:36 PM
Thanks for your information.
I just have a look of the Phoenix ORM PHO, but I don't understand it very clearly.
Could you make an example for me?
For example, let says we have an entity class
class Person{
int id;
int name;
int age;
int sex;
}
And a RestController to accept a http post request. how could I use the PHO to receive the data and insert into Phoenix?
Thank you very much for your help
Bin Ye