繁体   English   中英

这是什么意思“无法识别的hbm2ddl_auto值:更新”

What does it mean “Unrecognized hbm2ddl_auto value : update ”

提示:本站收集StackOverFlow近2千万问答,支持中英文搜索,鼠标放在语句上弹窗显示对应的参考中文或英文, 本站还提供   中文繁体   英文版本   中英对照 版本,有任何建议请联系yoyou2525@163.com。

 JPA cannot create table automatically with following error message:

(请注意,尤其是从以下内容中提取的消息:“ 2019-09-18 06:01:52.776 WARN 12248 --- [main] ohbiSessionFactoryBuilderImpl:无法识别的hbm2ddl_auto值:update。受支持的值包括create,create-drop,update,并验证。忽略”。)

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::       (v1.5.21.RELEASE)

2019-09-18 06:01:37.455  INFO 12248 --- [           main] c.s.mirrorworld.mirrorworldApplication   : Starting mirrorworldApplication on LAPTOP-FAS0SHLM with PID 12248 (C:\Users\yueho\eclipse-workspace\mirrorworld\target\classes started by yueho in C:\Users\yueho\eclipse-workspace\mirrorworld)
2019-09-18 06:01:37.466  INFO 12248 --- [           main] c.s.mirrorworld.mirrorworldApplication   : No active profile set, falling back to default profiles: default
2019-09-18 06:01:37.766  INFO 12248 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@2f217633: startup date [Wed Sep 18 06:01:37 CST 2019]; root of context hierarchy
2019-09-18 06:01:43.613  INFO 12248 --- [           main] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default'
2019-09-18 06:01:43.662  INFO 12248 --- [           main] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [
    name: default
    ...]
2019-09-18 06:01:43.955  INFO 12248 --- [           main] org.hibernate.Version                    : HHH000412: Hibernate Core {5.0.12.Final}
2019-09-18 06:01:43.959  INFO 12248 --- [           main] org.hibernate.cfg.Environment            : HHH000206: hibernate.properties not found
2019-09-18 06:01:43.962  INFO 12248 --- [           main] org.hibernate.cfg.Environment            : HHH000021: Bytecode provider name : javassist
2019-09-18 06:01:44.282  INFO 12248 --- [           main] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
2019-09-18 06:01:51.899  INFO 12248 --- [           main] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect

2019-09-18 06:01:52.776 WARN 12248 --- [main] ohbiSessionFactoryBuilderImpl:无法识别的hbm2ddl_auto值:update。 支持的值包括创建,创建删除,更新和验证。 忽略 2019-09-18 06:01:53.639 INFO 12248 --- [main] j.LocalContainerEntityManagerFactoryBean:为持久性单元'default'初始化的JPA EntityManagerFactory 2019-09-18 06:01:58.151 INFO 12248 --- [main] osjeaAnnotationMBeanExporter:在启​​动2019-09-18 06:01:58.180 INFO 12248 --- [main] csmirrorworld.mirrorworldApplication时注册用于JMX暴露的bean:在21.641秒内启动了mirrorworldApplication(JVM运行23.004)2019-09-18 06:02 :20.999 INFO 12248 --- [WT-EventQueue-0] ohhiQueryTranslatorFactoryInitiator:HHH000397:使用ASTQueryTranslatorFactory休眠:选择unit_quant0_.id作为id1_18_,unit_quant0_.formula作为Formula2_18_,unit_quant0_.name作为name3_18_4_,unit_quant0 _._ symbol_type_ity_ym__ity ___ ym._ _name_ym___。作为来自unit_quantity unit_quant0_的unit_qua5_18_,其中unit_quant0_.id =? 2019-09-18 06:02:21.607警告12248 --- [WT-EventQueue-0] ohengine.jdbc.spi.SqlExceptionHelper:SQL错误:1146,SQLState:42S02 2019-09-18 06:02:21.607错误12248 --- [WT-EventQueue-0] ohengine.jdbc.spi.SqlExceptionHelper:表'mirrorworld.unit_quantity'不存在线程“ AWT-EventQueue-0”中的异常javax.persistence.PersistenceException:org.hibernate.exception。 SQLGrammarException:无法在org.hibernate.jpa.org的org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1602)的org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1692)处提取ResultSet .internal.QueryImpl.getResultList(QueryImpl.java:492)位于sun.reflect.NativeMethodAccessorImpl.invoke0(原生方法)位于sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)位于sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess .java:43),位于org.springframework的java.lang.reflect.Method.invoke(Method.java:498)。 在com.stepforward.mirrorworld.p2_base_bean.Thing_Persistence_Service.Simply_get_thing_list(com.stepforward.mirrorworld.p2_base.com.sun.proxy。$ Proxy86.getResultList(Unknown Source)处的orm.jpa.SharedEntityManagerCreator $ DeferredQueryInvocationHandler.invoke(SharedEntityManagerCreator.java:375)在com.stepforward.mirrorworld.p3_application_bean.Thing.Thing_Aspect.Verify_component_value_step.com.step。一步。 .com.stepforward.mirrorworld.p3_application_bean.Thing_Aspect.Verify_component_value(Thing_Aspect.java:157)在com.stepforward.mirrorworld.p3_application_bean_Aspect_Aspect(Thing.Thing.Being :74),位于com.stepforward.mirrorworld.p2_base_bean.Thing_List_Service.S com.stepforward.mirrorworld.p2_base_bean.Thing_List_Service.Manage_user_intention(Thing_List_Service.java:68)处的ave_thing_list(Thing_List_Service.java:470)在com.stepforward.mirrorworld.p2_base_bean.Thing_Editor_forcom。 .mirrorworld.p4_view.Listener_Thing_List_Editor_View_Button.actionPerformed(Listener_Thing_List_Editor_View_Button.java:38)at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)at javax.swing.AbstractButton $ Handler.actionPerformed(AbstractButton.java:2348)在java.awt处swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)在javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)在javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) javax.swing.JComponent.processMouseEvent(JComponent.java:3324)的.Component.processMouseEvent(Component.java:6533)在java.awt.Component.processEvent(Component.jav a:6298)at java.awt.Container.processEvent(Container.java:2236)at java.awt.Component.dispatchEventImpl(Component.java:4889)at java.awt.Container.dispatchEventImpl(Container.java:2294)at java.awt.LightweightDispatcher的java.awt.Component.dispatchEvent(Component.java:4711)在java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)在java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)在java.awt.LightweightDispatcher java.awt.Component.dispatchEvent(Component。)上的java.awt.Container.dispatchEventImpl(Container.java:2280)处的.dispatchEvent(Container.java:4466)在java.awt.Window.dispatchEventImpl(Window.java:2746)处java:4711)at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)at java.awt.EventQueue.access $ 500(EventQueue.java:97)at java.awt.EventQueue $ 3.run(EventQueue.java:709 )的java.awt.EventQueue $ 3.run(EventQueue.java:703)的java.security.AccessController.doPrivileged(本机方法)的java.security.ProtectionDomain $ JavaSecurityAccessImpl.doIntersectionPrivilege(Protectio) nDomain.java:76)at java.security.ProtectionDomain $ JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)at java.awt.EventQueue $ 4.run(EventQueue.java:731)at java.awt.EventQueue $ 4.run(EventQueue) .java:729),位于java.security.ProtectionDomain $ JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76),位于java.security.ProtectionDomain $ JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76),位于java.awt.EventQueue.dispatchEvent(EventQueue.java:728)位于java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchatch.java:105)的java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)处的java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) .pumpEvents(EventDispatchThread.java:101)在java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)在java.awt.EventDispatchThread.run(EventDispatchThread.java:82)由以下原因引起:org.hibernate.exception.SQLGrammarException:无法在以下位置提取ResultSet org.hibernate.engine.jdbc.spi.SqlExceptionHelper上的org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)上的org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:63)在org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:79)处转换(SqlExceptionHelper.java:109)在org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:95)位于org.hibernate.loader.Loader.Loader.getResultSet(Loader.java:2117)位于org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1900)位于org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1876) )于org.hibernate.loader.Loader.doQuery(Loader.java:919)于org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:336)于org.hibernate.loader.Loader.doList(Loader.java: 2617)在org.hibernate.loader.Loader.doList(Loader.java:2600)在org.hibernate.loader.Loader.listIgnoreQueryCache(Load er.java:2429)org.hibernate.loader.Loader.list(Loader.java:2424)org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:501)org.hibernate.hql.internal org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:216)上的.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:371)在org.hibernate.internal.SessionImpl.list(SessionImpl.java:1326) )的org.hibernate.jpa.internal.QueryImpl.list(QueryImpl.java:606)的org.hibernate.jpa.internal.QueryImpl.list(QueryImpl.java:606)的org.hibernate.jpa.internal.QueryImpl.getResultList( QueryImpl.java:483)... 52更多原因:com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:表'mirrorworld.unit_quantity'在sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)处不存在java.lang.reflect.Const上的.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)在sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) com.mysql.jdbc.Util.handleNewInstance(Util.java:425)处ructor.newInstance(Constructor.java:423)com.mysql.jdbc处com.mysql.jdbc.Util.getInstance(Util.java:408)处com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3978)处com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3914)处的.SQLError.createSQLException(SQLError.java:944) com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2683)位于com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2495)位于com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2530) .jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1903)位于com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2011)位于sun.reflect.NativeMethodAccessorImpl.invoke0(本地方法)位于sun.reflect.NativeMethodAccessorImpl.inoke (NativeMethodAccessorImpl.java:62),位于org.apache.tomcat.jdbc.pool的java.lang.reflect.Method.invoke(Method.java:498),位于sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)处。州 mentFacade $ StatementProxy.invoke(StatementFacade.java:114)位于com.sun.proxy。$ Proxy87.executeQuery(未知源)位于org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:70).. 。68 more Hibernate:选择unit_quant0_.id作为id1_18_,unit_quant0_.formula作为Formula2_18_,unit_quant0_.name作为name3_18_,unit_quant0 _ .. symbol作为symbol4_18_,unit_quant0_.unit_quantity_type作为unit_qua5_18_,其中unit_qua5_18_ 2019-09-18 06:02:22.120 WARN 12248 --- [WT-EventQueue-0] ohengine.jdbc.spi.SqlExceptionHelper:SQL错误:1146,SQLState:42S02 2019-09-18 06:02:22.121错误12248 --- [WT-EventQueue-0] ohengine.jdbc.spi.SqlExceptionHelper:表'mirrorworld.unit_quantity'不存在线程“ AWT-EventQueue-0”中的异常javax.persistence.PersistenceException:org.hibernate.exception。 SQLGrammarException:无法在org.hibernate.jpa.org的org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1602)的org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1692)处提取ResultSet .internal.QueryImpl.getResultList(QueryImpl.java:492)位于sun.reflect.NativeMethodAccessorImpl.invoke0(原生方法)位于sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)位于sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess .java:43),位于org.springframework的java.lang.reflect.Method.invoke(Method.java:498)。 在com.stepforward.mirrorworld.p2_base_bean.Thing_Persistence_Service.Simply_get_thing_list(com.stepforward.mirrorworld.p2_base.com.sun.proxy。$ Proxy86.getResultList(Unknown Source)处的orm.jpa.SharedEntityManagerCreator $ DeferredQueryInvocationHandler.invoke(SharedEntityManagerCreator.java:375)在com.stepforward.mirrorworld.p3_application_bean.Thing.Thing_Aspect.Verify_component_value_step.com.step。一步。 .com.stepforward.mirrorworld.p3_application_bean.Thing_Aspect.Verify_component_value(Thing_Aspect.java:157)在com.stepforward.mirrorworld.p3_application_bean_Aspect_Aspect(Thing.Thing.Being :74),位于com.stepforward.mirrorworld.p2_base_bean.Thing_List_Service.S com.stepforward.mirrorworld.p2_base_bean.Thing_List_Service.Manage_user_intention(Thing_List_Service.java:68)处的ave_thing_list(Thing_List_Service.java:470)在com.stepforward.mirrorworld.p2_base_bean.Thing_Editor_forcom。 .mirrorworld.p4_view.Listener_Thing_List_Editor_View_Button.actionPerformed(Listener_Thing_List_Editor_View_Button.java:38)at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)at javax.swing.AbstractButton $ Handler.actionPerformed(AbstractButton.java:2348)在java.awt处swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)在javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)在javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) javax.swing.JComponent.processMouseEvent(JComponent.java:3324)的.Component.processMouseEvent(Component.java:6533)在java.awt.Component.processEvent(Component.jav a:6298)at java.awt.Container.processEvent(Container.java:2236)at java.awt.Component.dispatchEventImpl(Component.java:4889)at java.awt.Container.dispatchEventImpl(Container.java:2294)at java.awt.LightweightDispatcher的java.awt.Component.dispatchEvent(Component.java:4711)在java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)在java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)在java.awt.LightweightDispatcher java.awt.Component.dispatchEvent(Component。)上的java.awt.Container.dispatchEventImpl(Container.java:2280)处的.dispatchEvent(Container.java:4466)在java.awt.Window.dispatchEventImpl(Window.java:2746)处java:4711)at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)at java.awt.EventQueue.access $ 500(EventQueue.java:97)at java.awt.EventQueue $ 3.run(EventQueue.java:709 )的java.awt.EventQueue $ 3.run(EventQueue.java:703)的java.security.AccessController.doPrivileged(本机方法)的java.security.ProtectionDomain $ JavaSecurityAccessImpl.doIntersectionPrivilege(Protectio) nDomain.java:76)at java.security.ProtectionDomain $ JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)at java.awt.EventQueue $ 4.run(EventQueue.java:731)at java.awt.EventQueue $ 4.run(EventQueue) .java:729),位于java.security.ProtectionDomain $ JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76),位于java.security.ProtectionDomain $ JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76),位于java.awt.EventQueue.dispatchEvent(EventQueue.java:728)位于java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchatch.java:105)的java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)处的java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) .pumpEvents(EventDispatchThread.java:101)在java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)在java.awt.EventDispatchThread.run(EventDispatchThread.java:82)由以下原因引起:org.hibernate.exception.SQLGrammarException:无法在以下位置提取ResultSet org.hibernate.engine.jdbc.spi.SqlExceptionHelper上的org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)上的org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:63)在org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:79)处转换(SqlExceptionHelper.java:109)在org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:95)位于org.hibernate.loader.Loader.Loader.getResultSet(Loader.java:2117)位于org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1900)位于org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1876) )于org.hibernate.loader.Loader.doQuery(Loader.java:919)于org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:336)于org.hibernate.loader.Loader.doList(Loader.java: 2617)在org.hibernate.loader.Loader.doList(Loader.java:2600)在org.hibernate.loader.Loader.listIgnoreQueryCache(Load er.java:2429)org.hibernate.loader.Loader.list(Loader.java:2424)org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:501)org.hibernate.hql.internal org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:216)上的.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:371)在org.hibernate.internal.SessionImpl.list(SessionImpl.java:1326) )的org.hibernate.jpa.internal.QueryImpl.list(QueryImpl.java:606)的org.hibernate.jpa.internal.QueryImpl.getResultList()处的org.hibernate.internal.QueryImpl.list(QueryImpl.java:87) QueryImpl.java:483)... 52更多原因:com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:表'mirrorworld.unit_quantity'在sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)处不存在java.lang.reflect.Const上的.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)在sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) com.mysql.jdbc.Util.handleNewInstance(Util.java:425)处ructor.newInstance(Constructor.java:423)com.mysql.jdbc处com.mysql.jdbc.Util.getInstance(Util.java:408)处com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3978)处com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3914)处的.SQLError.createSQLException(SQLError.java:944) com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2683)位于com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2495)位于com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2530) .jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1903)位于com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2011)位于sun.reflect.NativeMethodAccessorImpl.invoke0(本地方法)位于sun.reflect.NativeMethodAccessorImpl.inoke (NativeMethodAccessorImpl.java:62),位于org.apache.tomcat.jdbc.pool的java.lang.reflect.Method.invoke(Method.java:498),位于sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)处。州 mentFacade $ StatementProxy.invoke(StatementFacade.java:114)位于com.sun.proxy。$ Proxy87.executeQuery(未知源)位于org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:70).. 。68更多2019-09-18 06:02:23.818信息12248 --- [Thread-4] scaAnnotationConfigApplicationContext:关闭org.springframework.context.annotation.AnnotationConfigApplicationContext@2f217633:启动日期[CST Sep 18 06:01:37 CST 2019]; 上下文层次结构的根2019-09-18 06:02:23.821 INFO 12248 --- [Thread-4] osjeaAnnotationMBeanExporter:关机时注销JMX暴露的bean 2019-09-18 06:02:23.849 INFO 12248 --- [线程-4] j.LocalContainerEntityManagerFactoryBean:为持久性单元“默认”关闭JPA EntityManagerFactory

1.应用特性 ===========================

spring.datasource.url=jdbc:mysql://127.0.0.1:3306/mirrorworld
spring.datasource.username=root
spring.datasource.password=mirror
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.max-idle=10
spring.datasource.max-wait=10000
spring.datasource.min-idle=5
spring.datasource.initial-size=5
server.port=8011
server.session.timeout=10
server.tomcat.uri-encoding=UTF-8
spring.jpa.database=MYSQL
spring.jpa.show-sql=true
spring.jpa.hibernate.format_sql=false
spring.jpa.generate-ddl=true  
spring.jpa.hibernate.ddl-auto=update  
spring.jpa.hibernate.naming_strategy=org.hibernate.cfg.ImprovedNamingStrategy  
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect

2.SPRINGBOOTAPPLICATION ================

@EntityScan
(   basePackages = 
{
    "com.stepforward.mirrorworld.p3_application_bean.Unit"
}
)
@EnableJpaRepositories
(
    basePackages = 
{
    "com.stepforward.mirrorworld.p3_application_bean.Unit"
}
)

@SpringBootApplication
public class mirrorworldApplication
{
......
}

**3.ENTITY**
============

@Entity
public class Unit_Quantity extends Thing 
{
    @Id
    @GenericGenerator(name="assigned", strategy="assigned")
    @GeneratedValue(generator="assigned")
    @Column(nullable=false,length=100)
    private String Id;  
    @Column(nullable=false,length=150)
    private String Name;
    @Column(nullable=false,length=20)
    private String Unit_Quantity_Type;
    @Column(nullable=false,length=20)
    private String Symbol;
    @Column(nullable=true,length=100)
    private String Formula; 
    ......
    }
问题暂未有回复.您可以查看右边的相关问题.
3 Hibernate hbm2ddl.auto update不会删除带有mysql的列

它增加了新的,但据我所知,它不会丢弃旧的? 当我说旧的时,我的意思是实体对象的属性现在被完全删除,以前它们存在并用@column注释 我是唯一可以手动删除col或更改配置值来create吗? 两者都不是特别迷人。 或者是其他东西 ? ...

5 hibernate中hibernate.hbm2ddl.auto =“update”的确切行为是什么?

hibernate.hbm2ddl.auto="update"很奇怪。 任何数据库实体..如果不在数据库中(数据库中的表和表中的列)将通过保持UPDATE来创建。 但是,如果我想更改任何现有数据类型或任何列的大小,那么它不起作用。 通过这种方式,我创建了一个UPDATE创建的东西,但没有更 ...

6 hibernate.hbm2ddl.auto Hibernate如何决定何时创建或更新ddl?

休眠和hsqldb中ddl的自动创建方面存在一些问题。 我们用 通常,当我们更改映射对象时,hibernate会在数据库上的架构中自动创建表,但有时它会拒绝这样做。 在这种情况下,我们必须从文件系统中手动删除数据库,以说服休眠状态重新创建所有表。 有人知道休眠是如何决定何时 ...

7 ddl-auto 和 hbm2ddl.auto 有什么区别?

每次我尝试从 VSCode 启动“Spring Boot Dashboard”时,我都会在使用以下命令时遇到错误。 但是,我设法在堆栈溢出中找到了这一行,使其工作。 问题是我不知道差异以及它将如何影响我的生产。 任何形式的帮助都将不胜感激。 ...

8 休眠状态hbm2ddl.auto =更新

我们正在使用hibernate3.jar。hibernate属性设置如下, 在现有表中添加了新列,并将我们的应用程序从旧版本迁移到新版本。 迁移后,该列已成功添加到表中,但在日志中遇到以下错误: 该列已成功添加,但仍面临日志中的错误。 ...

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2022 STACKOOM.COM