Generate hibernate entity beans from XSD

前端 未结 2 1470
灰色年华
灰色年华 2021-02-06 06:00

My requirement is to save a huge XML values to database.
After analyzing few options I finalized that generate entity bean classes from huge xml and then persist it using h

2条回答
  •  萌比男神i
    2021-02-06 06:06

    Here's some documentation:

    http://confluence.highsource.org/display/HJ3/Making+schema-derived+classes+ready+for+JPA

    http://java.net/projects/hyperjaxb

    Here's a working example for a project I have completed:

      
        org.jvnet.jaxb2.maven2
        maven-jaxb2-plugin
        0.7.4
        
                      
                              org.jvnet.hyperjaxb3
                              hyperjaxb3-ejb-plugin
                              0.5.5
                      
                
        
          
            generate-domain1
            
              generate
            
            
              false
              
                account.xsd
                customer.xsd
                address.xsd
              
              
                domain-bindings.xjb
              
              true
              your.package.here
              ${project.build.directory}/generated-sources/jaxbandjpa
              
                -Xannotate
                -Xhyperjaxb3-ejb
                                 
               
                
                  org.jvnet.jaxb2_commons
                  jaxb2-basics
                  0.6.0
                
                
                  org.jvnet.jaxb2_commons
                  jaxb2-basics-annotate
                  0.6.0
                
              
            
          
        
      
    

    hope it helps

提交回复
热议问题