保存进度!
This commit is contained in:
		@@ -1,7 +1,7 @@
 | 
				
			|||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 | 
					<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 | 
				
			||||||
  <modelVersion>4.0.0</modelVersion>
 | 
					  <modelVersion>4.0.0</modelVersion>
 | 
				
			||||||
  <groupId>com.cpic.xim</groupId>
 | 
					  <groupId>com.cpic.xim</groupId>
 | 
				
			||||||
  <artifactId>car_dealer</artifactId>
 | 
					  <artifactId>cardealer</artifactId>
 | 
				
			||||||
  <packaging>war</packaging>
 | 
					  <packaging>war</packaging>
 | 
				
			||||||
  <version>1.0</version>
 | 
					  <version>1.0</version>
 | 
				
			||||||
  <name>car_dealer Maven Webapp</name>
 | 
					  <name>car_dealer Maven Webapp</name>
 | 
				
			||||||
@@ -13,38 +13,12 @@
 | 
				
			|||||||
      <version>3.8.1</version>
 | 
					      <version>3.8.1</version>
 | 
				
			||||||
      <scope>test</scope>
 | 
					      <scope>test</scope>
 | 
				
			||||||
    </dependency>
 | 
					    </dependency>
 | 
				
			||||||
    <!-- https://mvnrepository.com/artifact/jakarta.servlet/jakarta.servlet-api -->
 | 
					 | 
				
			||||||
    <dependency>
 | 
					 | 
				
			||||||
      <groupId>jakarta.servlet</groupId>
 | 
					 | 
				
			||||||
      <artifactId>jakarta.servlet-api</artifactId>
 | 
					 | 
				
			||||||
      <version>6.0.0</version>
 | 
					 | 
				
			||||||
      <scope>provided</scope>
 | 
					 | 
				
			||||||
    </dependency>
 | 
					 | 
				
			||||||
    <!-- https://mvnrepository.com/artifact/javax.servlet.jsp/javax.servlet.jsp-api -->
 | 
					 | 
				
			||||||
    <dependency>
 | 
					 | 
				
			||||||
      <groupId>javax.servlet.jsp</groupId>
 | 
					 | 
				
			||||||
      <artifactId>javax.servlet.jsp-api</artifactId>
 | 
					 | 
				
			||||||
      <version>2.3.3</version>
 | 
					 | 
				
			||||||
      <scope>provided</scope>
 | 
					 | 
				
			||||||
    </dependency>
 | 
					 | 
				
			||||||
    <!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc -->
 | 
					    <!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc -->
 | 
				
			||||||
    <dependency>
 | 
					    <dependency>
 | 
				
			||||||
      <groupId>org.springframework</groupId>
 | 
					      <groupId>org.springframework</groupId>
 | 
				
			||||||
      <artifactId>spring-webmvc</artifactId>
 | 
					      <artifactId>spring-webmvc</artifactId>
 | 
				
			||||||
      <version>5.3.23</version>
 | 
					      <version>5.3.23</version>
 | 
				
			||||||
    </dependency>
 | 
					    </dependency>
 | 
				
			||||||
    <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
 | 
					 | 
				
			||||||
    <dependency>
 | 
					 | 
				
			||||||
      <groupId>com.fasterxml.jackson.core</groupId>
 | 
					 | 
				
			||||||
      <artifactId>jackson-databind</artifactId>
 | 
					 | 
				
			||||||
      <version>2.13.4</version>
 | 
					 | 
				
			||||||
    </dependency>
 | 
					 | 
				
			||||||
    <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-annotations -->
 | 
					 | 
				
			||||||
    <dependency>
 | 
					 | 
				
			||||||
      <groupId>com.fasterxml.jackson.core</groupId>
 | 
					 | 
				
			||||||
      <artifactId>jackson-annotations</artifactId>
 | 
					 | 
				
			||||||
      <version>2.13.4</version>
 | 
					 | 
				
			||||||
    </dependency>
 | 
					 | 
				
			||||||
    <dependency>
 | 
					    <dependency>
 | 
				
			||||||
      <groupId>com.oracle</groupId>
 | 
					      <groupId>com.oracle</groupId>
 | 
				
			||||||
      <artifactId>ojdbc8</artifactId>
 | 
					      <artifactId>ojdbc8</artifactId>
 | 
				
			||||||
@@ -52,10 +26,35 @@
 | 
				
			|||||||
      <!-- <scope>system</scope>
 | 
					      <!-- <scope>system</scope>
 | 
				
			||||||
      <systemPath>${project.basedir}/lib/ojdbc8.jar</systemPath> -->
 | 
					      <systemPath>${project.basedir}/lib/ojdbc8.jar</systemPath> -->
 | 
				
			||||||
    </dependency>
 | 
					    </dependency>
 | 
				
			||||||
 | 
					    <!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api -->
 | 
				
			||||||
 | 
					    <dependency>
 | 
				
			||||||
 | 
					      <groupId>javax.servlet</groupId>
 | 
				
			||||||
 | 
					      <artifactId>javax.servlet-api</artifactId>
 | 
				
			||||||
 | 
					      <version>4.0.1</version>
 | 
				
			||||||
 | 
					      <scope>provided</scope>
 | 
				
			||||||
 | 
					    </dependency>
 | 
				
			||||||
 | 
					    <dependency>
 | 
				
			||||||
 | 
					      <groupId>javax.validation</groupId>
 | 
				
			||||||
 | 
					      <artifactId>validation-api</artifactId>
 | 
				
			||||||
 | 
					      <version>2.0.1.Final</version>
 | 
				
			||||||
 | 
					    </dependency>
 | 
				
			||||||
 | 
					    <dependency>
 | 
				
			||||||
 | 
					      <groupId>org.hibernate</groupId>
 | 
				
			||||||
 | 
					      <artifactId>hibernate-validator</artifactId>
 | 
				
			||||||
 | 
					      <version>7.0.1.Final</version>
 | 
				
			||||||
 | 
					    </dependency>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  </dependencies>
 | 
					  </dependencies>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  <build>
 | 
					  <build>
 | 
				
			||||||
    <finalName>car_dealer</finalName>
 | 
					    <finalName>cardealer</finalName>
 | 
				
			||||||
 | 
					    <plugins>
 | 
				
			||||||
 | 
					      <plugin>
 | 
				
			||||||
 | 
					        <groupId>org.apache.maven.plugins</groupId>
 | 
				
			||||||
 | 
					        <artifactId>maven-war-plugin</artifactId>
 | 
				
			||||||
 | 
					        <version>3.2.2</version>
 | 
				
			||||||
 | 
					      </plugin>
 | 
				
			||||||
 | 
					    </plugins>
 | 
				
			||||||
  </build>
 | 
					  </build>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  <properties>
 | 
					  <properties>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -0,0 +1,45 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @Author: Kane
 | 
				
			||||||
 | 
					 * @Date: 2022-09-28 15:47:02
 | 
				
			||||||
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 | 
					 * @LastEditTime: 2022-09-28 18:55:22
 | 
				
			||||||
 | 
					 * @FilePath: \car_dealer\src\main\java\com\cpic\xim\car_dealer\controllers\fileupload\FileUploadController.java
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					 * 
 | 
				
			||||||
 | 
					 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package com.cpic.xim.car_dealer.controllers.fileupload;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.io.IOException;
 | 
				
			||||||
 | 
					import java.io.PrintWriter;
 | 
				
			||||||
 | 
					import java.nio.channels.IllegalSelectorException;
 | 
				
			||||||
 | 
					import javax.servlet.ServletException;
 | 
				
			||||||
 | 
					import javax.servlet.http.HttpServletRequest;
 | 
				
			||||||
 | 
					import javax.servlet.http.HttpServletResponse;
 | 
				
			||||||
 | 
					import org.springframework.stereotype.Controller;
 | 
				
			||||||
 | 
					import org.springframework.ui.Model;
 | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.RequestMapping;
 | 
				
			||||||
 | 
					import org.springframework.web.multipart.MultipartFile;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Controller
 | 
				
			||||||
 | 
					public class FileUploadController
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    @RequestMapping( value = "/test")
 | 
				
			||||||
 | 
					    public void test() throws ServletException, IOException
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        // PrintWriter writer = response.getWriter();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // writer.write( "测试!" );
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @RequestMapping( "/upload")
 | 
				
			||||||
 | 
					    public void uploadFile( HttpServletRequest request, HttpServletResponse response,
 | 
				
			||||||
 | 
					            MultipartFile file, Model model ) throws IllegalSelectorException, IOException
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        PrintWriter writer = response.getWriter();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        writer.write( file.getOriginalFilename() );
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										7
									
								
								code/java/car_dealer/src/main/resources/AppConfig.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								code/java/car_dealer/src/main/resources/AppConfig.json
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,7 @@
 | 
				
			|||||||
 | 
					{
 | 
				
			||||||
 | 
					    "appName": "车商渠道管理工具",
 | 
				
			||||||
 | 
					    "db_config": {
 | 
				
			||||||
 | 
					        "userName": "car_dealer",
 | 
				
			||||||
 | 
					        "password": "Cpic123456"
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,21 @@
 | 
				
			|||||||
 | 
					<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:jdbc="http://www.springframework.org/schema/jdbc" xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:util="http://www.springframework.org/schema/util" xmlns:jpa="http://www.springframework.org/schema/data/jpa" xsi:schemaLocation="
 | 
				
			||||||
 | 
					    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
 | 
				
			||||||
 | 
					    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd
 | 
				
			||||||
 | 
					    http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.2.xsd
 | 
				
			||||||
 | 
					    http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.2.xsd
 | 
				
			||||||
 | 
					    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
 | 
				
			||||||
 | 
					    http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.3.xsd
 | 
				
			||||||
 | 
					    http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd
 | 
				
			||||||
 | 
					    http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd
 | 
				
			||||||
 | 
					    http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.2.xsd">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <context:component-scan base-package="com.cpic.xim" />
 | 
				
			||||||
 | 
					    <mvc:annotation-driven />
 | 
				
			||||||
 | 
					    <mvc:default-servlet-handler />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
 | 
				
			||||||
 | 
					        <property name="prefix" value="/WEB-INF/jsp/" />
 | 
				
			||||||
 | 
					        <property name="suffix" value=".jsp" />
 | 
				
			||||||
 | 
					    </bean>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					</beans>
 | 
				
			||||||
@@ -0,0 +1,21 @@
 | 
				
			|||||||
 | 
					<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:jdbc="http://www.springframework.org/schema/jdbc" xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:util="http://www.springframework.org/schema/util" xmlns:jpa="http://www.springframework.org/schema/data/jpa" xsi:schemaLocation="
 | 
				
			||||||
 | 
					    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
 | 
				
			||||||
 | 
					    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd
 | 
				
			||||||
 | 
					    http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.2.xsd
 | 
				
			||||||
 | 
					    http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.2.xsd
 | 
				
			||||||
 | 
					    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
 | 
				
			||||||
 | 
					    http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.3.xsd
 | 
				
			||||||
 | 
					    http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd
 | 
				
			||||||
 | 
					    http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd
 | 
				
			||||||
 | 
					    http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.2.xsd">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <context:component-scan base-package="com.cpic.xim" />
 | 
				
			||||||
 | 
					    <mvc:annotation-driven />
 | 
				
			||||||
 | 
					    <mvc:default-servlet-handler />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
 | 
				
			||||||
 | 
					        <property name="prefix" value="/WEB-INF/jsp/" />
 | 
				
			||||||
 | 
					        <property name="suffix" value=".jsp" />
 | 
				
			||||||
 | 
					    </bean>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					</beans>
 | 
				
			||||||
@@ -1,7 +1,21 @@
 | 
				
			|||||||
<!DOCTYPE web-app PUBLIC
 | 
					<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
 | 
				
			||||||
 "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
 | 
					 | 
				
			||||||
 "http://java.sun.com/dtd/web-app_2_3.dtd" >
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
<web-app>
 | 
					<web-app>
 | 
				
			||||||
  <display-name>Archetype Created Web Application</display-name>
 | 
					  <display-name>Archetype Created Web Application</display-name>
 | 
				
			||||||
</web-app>
 | 
					
 | 
				
			||||||
 | 
					  <!-- springMVC -->
 | 
				
			||||||
 | 
					  <servlet>
 | 
				
			||||||
 | 
					    <servlet-name>springmvc</servlet-name>
 | 
				
			||||||
 | 
					    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
 | 
				
			||||||
 | 
					    <init-param>
 | 
				
			||||||
 | 
					      <param-name>contextConfigLocation</param-name>
 | 
				
			||||||
 | 
					      <param-value>classpath:spring.xml</param-value>
 | 
				
			||||||
 | 
					    </init-param>
 | 
				
			||||||
 | 
					    <load-on-startup>1</load-on-startup>
 | 
				
			||||||
 | 
					  </servlet>
 | 
				
			||||||
 | 
					  <servlet-mapping>
 | 
				
			||||||
 | 
					    <servlet-name>springmvc</servlet-name>
 | 
				
			||||||
 | 
					    <url-pattern>/</url-pattern>
 | 
				
			||||||
 | 
					  </servlet-mapping>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					</web-app>
 | 
				
			||||||
@@ -1,5 +0,0 @@
 | 
				
			|||||||
<html>
 | 
					 | 
				
			||||||
<body>
 | 
					 | 
				
			||||||
<h2>Hello World!</h2>
 | 
					 | 
				
			||||||
</body>
 | 
					 | 
				
			||||||
</html>
 | 
					 | 
				
			||||||
		Reference in New Issue
	
	Block a user