[英]Trying to get data from Mysql db (Spring Boot + Vaadin)
I'm trying to get and write data to Mysql Db using Spring Boot & Vaadin. 我正在尝试使用Spring Boot和Vaadin获取数据并将数据写入Mysql Db。 I'm new in Spring and it's too boringly to make simple web project with all of Spring's configurations.
我是Spring的新手,用Spring的所有配置制作简单的Web项目太无聊了。 So I decided to use Spring Boot.
所以我决定使用Spring Boot。 And now my headache is - getting and writing data to Mysql Db.
现在我头疼的是-获取数据并将数据写入Mysql Db。 I wrote in application.properties configuration for DB, also "spring.jpa.hibernate.ddl-auto=create" create new table in db (if it's not exists), but no data loaded and no data added to db table.
我在DB的application.properties配置中写道,“ spring.jpa.hibernate.ddl-auto = create”也在db中创建新表(如果不存在),但是没有加载数据,也没有向db表添加数据。 As I see from this doc https://docs.spring.io/spring-boot/docs/current/reference/html/howto-database-initialization.html there is no need to write from beginning some classes to connecting db and getting data... Please help.
正如我从这份文件https://docs.spring.io/spring-boot/docs/current/reference/html/howto-database-initialization.html所看到的,从开始一些类到连接数据库并获取数据...请帮助。 https://github.com/AntonKostyukewicz/VaadinCrud - here is my sources of project.
https://github.com/AntonKostyukewicz/VaadinCrud-这是我的项目来源。
Have you looked at the Vaadin JPA Container add-on? 您是否看过Vaadin JPA容器插件? If you are willing to talk to the DB in JPA, that's an excellent option.
如果您愿意与JPA中的DB交谈,那是一个很好的选择。 https://vaadin.com/docs/-/part/framework/jpacontainer/jpacontainer-overview.html
https://vaadin.com/docs/-/part/framework/jpacontainer/jpacontainer-overview.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.