Integrate Spring Boot in an EAR project

前端 未结 3 1280
傲寒
傲寒 2021-01-02 19:55

I have an existing war project created using spring boot. How to package it within an EAR which has an EJB module?

Is there any way to move the model and dao package

3条回答
  •  别那么骄傲
    2021-01-02 20:21

    You need a parent project that includes a war project, which will be your spring boot project, and an ear project just for making your ear.

    Parent will need to have the spring boot as its parent :

    
    
      4.0.0
    
     
        org.springframework.boot
        spring-boot-starter-parent
        1.4.3.RELEASE
      
    
      com.greg
      ear-example
      1.0-SNAPSHOT
      pom
    
      
            1.0-SNAPSHOT
      
    
      ear-example
      
        example-ear
        example-war
      
    
    
    

    Your ear project is:

    
    
      4.0.0
    
      
        com.greg
        ear-example
        1.0-SNAPSHOT
      
    
      example-ear
      ear
    
      
        
          com.greg
          example-war
          ${project.version}
          war
        
      
    
      
       
         
            maven-ear-plugin
            2.10.1
            
                    
                            
                                    com.greg
                                    example-war
                                    /appname
                            
                    
            
          
        
      
    
    
    

提交回复
热议问题