Maven整合SSM所需的jar包配置(pom.xml)&SSM整合所需的各种.xml

pom.xml


	4.0.0
	com.dk
	ssm-crud
	0.0.1-SNAPSHOT
	war
	
	
	
	
		2.5
	
	

		
		
			com.github.pagehelper
			pagehelper
			5.0.0
		

		
		
		
			org.mybatis.generator
			mybatis-generator-core
			1.3.5
		


		
			org.springframework
			spring-webmvc
			4.3.7.RELEASE
		

		
		
		
			com.fasterxml.jackson.core
			jackson-databind
			2.8.8
		

		
		
		
			org.hibernate
			hibernate-validator
			5.4.1.Final
		


		
		
		
			org.springframework
			spring-jdbc
			4.3.7.RELEASE
		

		
		
		
			org.springframework
			spring-test
			4.3.7.RELEASE
		


		
		
		
			org.springframework
			spring-aspects
			4.3.7.RELEASE
		

		
		
		
			org.mybatis
			mybatis
			3.4.2
		
		
		
		
			org.mybatis
			mybatis-spring
			1.3.1
		

		
		
		
			c3p0
			c3p0
			0.9.1
		
		
		
			mysql
			mysql-connector-java
			8.0.11
		
		
		
		
			jstl
			jstl
			1.2
		

		
		
			javax.servlet
			javax.servlet-api
			3.0.1
			provided
		


		
		
		
			junit
			junit
			4.12
		
	
	








org.apache.maven.plugins

maven-compiler-plugin

3.5.1



1.8

1.8

true







	

web.xml



	
	
	
	
		contextConfigLocation
		classpath:applicationContext.xml
	

	
	
		org.springframework.web.context.ContextLoaderListener
	
	
	
	
	
		dispatcherServlet
		org.springframework.web.servlet.DispatcherServlet
		1
	

	
	
		dispatcherServlet
		/
	
	
	
	
		CharacterEncodingFilter
		org.springframework.web.filter.CharacterEncodingFilter
		
			encoding
			utf-8
		
		
			forceRequestEncoding
			true
		
		
			forceResponseEncoding
			true
		
	
	
		CharacterEncodingFilter
		/*
	
	
	
	
		HiddenHttpMethodFilter
		org.springframework.web.filter.HiddenHttpMethodFilter
	
	
		HiddenHttpMethodFilter
		/*
	
	
		HttpPutFormContentFilter
		org.springframework.web.filter.HttpPutFormContentFilter
	
	
		HttpPutFormContentFilter
		/*
	
	
	

springmvc的前端控制器,拦截所有请求

dispatcherServlet-servlet.xml (和web.xml同级目录下创建)




	
	
		
		
	
	
	
	
		
		
	
	
	
	
	
	
	


 applicationContext.xml




	
	
		
		
	
	
	
	
		
		
	
	
	
	
	
	
	


mybatis 逆向工程的xml





	
		
			
		
		
		
		

		
			
		

		
		
			
			
		

		
		
			
		

		
		
			
		


		
		

配套的test.java

package com.dk.crud.test;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

import org.mybatis.generator.api.MyBatisGenerator;
import org.mybatis.generator.config.Configuration;
import org.mybatis.generator.config.xml.ConfigurationParser;
import org.mybatis.generator.internal.DefaultShellCallback;

public class MBGTest {

	public static void main(String[] args) throws Exception {
		List warnings = new ArrayList();
		boolean overwrite = true;
		File configFile = new File("mbg.xml");
		ConfigurationParser cp = new ConfigurationParser(warnings);
		Configuration config = cp.parseConfiguration(configFile);
		DefaultShellCallback callback = new DefaultShellCallback(overwrite);
		MyBatisGenerator myBatisGenerator = new MyBatisGenerator(config,
				callback, warnings);
		myBatisGenerator.generate(null);
	}
}

mybatis-config.xml




	
		
	
	
	
		
	
	
	
		
			
			
		
	

 

 

你可能感兴趣的:(Maven,ssm)