# JpaCommentAnnotation **Repository Path**: token0801/JpaCommentAnnotation ## Basic Information - **Project Name**: JpaCommentAnnotation - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2022-01-19 - **Last Updated**: 2022-05-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # JpaCommentAnnotation Comment annotation support for JPA DDL generation. To setup the integrator, add this config class: ```java @Component public class HibernateConfig implements HibernatePropertiesCustomizer { @Override public void customize(Map hibernateProperties) { hibernateProperties.put("hibernate.use_sql_comments", true); hibernateProperties.put("hibernate.integrator_provider", (IntegratorProvider) () -> Collections.singletonList(CommentIntegrator.INSTANCE)); } } ``` Code sample: ```java @Data @Entity @Comment("Demo table comment") @Table(name = "demo_table") public class DemoTable { @Id @GeneratedValue @Comment("ID comment") @Column(name = "id") private Integer id; @Comment("Value comment") @Column(name = "value") private String value; } ``` ## License This project is licensed under the terms of the **MIT** license.