博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
MAVEN进行debug过程
阅读量:6814 次
发布时间:2019-06-26

本文共 2479 字,大约阅读时间需要 8 分钟。

hot3.png

  1. pom.xml配置

  2.     
    vst_order
        
                
                    
    src/main/config
                    
                        
    *.properties
                    
                
                            
                    
    src/main/java
                    
                        
    **/*.xml
                    
                    
    false
                  
                        
             
                
                    
    src/test/config
                
                
                    
    src/test/java
                
            
            
                
                    
    maven-compiler-plugin
                    
    3.1
                    
                        
    UTF-8
                        
    1.6                    
    1.6
                    
                
                
       
    org.apache.maven.plugins
           
    maven-war-plugin
           
    2.2
           
    true
         
     
     
    org.apache.maven.plugins
    maven-surefire-plugin
    true
            
      
  3. java目录结构

    test目录下配置config目录和java目录,将所有相关配置文件放到config目录中

  4. java代码书写

  5. private LineProdPackageGroupService lineProdPackageGroupServiceImpl;	@Before	public void prepare() {		String[] contextPaths = {"applicationContext-vst-order-beans.xml"};		applicationContext = new ClassPathXmlApplicationContext(contextPaths);		if (this.applicationContext != null) {			this.lineProdPackageGroupServiceImpl = (LineProdPackageGroupService) this.applicationContext					.getBean("lineProdPackageGroupServiceImpl");		}	}	@Test	public void testCreateProduct(){	this.lineProdPackageGroupServiceImpl.initTrafficBizInfo(null);}

转载于:https://my.oschina.net/u/1458864/blog/314912

你可能感兴趣的文章