cxf: generate jaxb constructor with arguments

后端 未结 1 798
隐瞒了意图╮
隐瞒了意图╮ 2021-02-03 13:05

Is there a way in CXF to generate JAXB classes with full constructors (i.e., with the members of the class as arguments)?

1条回答
  •  离开以前
    2021-02-03 13:39

    Use the value-constructor xjc plugin.

    Maven snippet:

            
                org.apache.cxf
                cxf-codegen-plugin
                ${cxf.version}
                
                    
                        generate-sources
                        generate-sources
                        
                            
                                
                                    -xjc-Xvalue-constructor
                                
                            
                        
                        
                            wsdl2java
                        
                    
                
                
                    
                        org.jvnet.jaxb2_commons
                        jaxb2-value-constructor
                        3.0
                    
                    
                        org.jvnet.jaxb2_commons
                        jaxb2-basics
                        0.6.2
                    
                
            
    

    0 讨论(0)
提交回复
热议问题