后端加入需求管理模块。

This commit is contained in:
Kane Wang 2023-01-29 17:32:52 +08:00
parent 1cdf6502e7
commit e2486d497f
10 changed files with 281 additions and 1 deletions

View File

@ -1,3 +1,4 @@
{ {
"java.configuration.updateBuildConfiguration": "automatic" "java.configuration.updateBuildConfiguration": "automatic",
"java.compile.nullAnalysis.mode": "automatic"
} }

View File

@ -0,0 +1,42 @@
/*
* @Author: Kane
* @Date: 2023-01-29 13:59:37
* @LastEditors: Kane
* @LastEditTime: 2023-01-29 17:10:18
* @FilePath: \requirement\src\main\java\com\cpic\xim\web\controllers\requirements\RequirementController.java
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
package com.cpic.xim.web.controllers.requirements;
import java.io.IOException;
import java.nio.channels.IllegalSelectorException;
import java.sql.SQLException;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.cpic.xim.web.controllers.requirements.param.*;
import com.cpic.xim.web.controllers.requirements.response.*;
@SuppressWarnings( "unused" )
@Controller
public class RequirementController
{
@RequestMapping( "/query_requirements.do" )
@ResponseBody
public RequirementQueryResult queryRequirements( @RequestBody RequirementQueryParam param )
{
RequirementQueryResult result = new RequirementQueryResult();
result.setSuccess( true );
return result;
}
}

View File

@ -0,0 +1,97 @@
/*
* @Author: Kane
* @Date: 2023-01-29 15:45:00
* @LastEditors: Kane
* @LastEditTime: 2023-01-29 16:04:48
* @FilePath: \requirement\src\main\java\com\cpic\xim\web\controllers\requirements\param\RequirementQueryParam.java
* @Description: 查询需求用的参数对象从JSON转换而来
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
package com.cpic.xim.web.controllers.requirements.param;
import com.fasterxml.jackson.annotation.JsonProperty;
public final class RequirementQueryParam
{
public RequirementQueryParam()
{}
public String getTitle()
{
return title;
}
public void setTitle( String title )
{
this.title = title;
}
public String getSerial_no()
{
return serial_no;
}
public void setSerial_no( String serial_no )
{
this.serial_no = serial_no;
}
public String getRequest_people()
{
return request_people;
}
public void setRequest_people( String request_people )
{
this.request_people = request_people;
}
public String getStatus()
{
return status;
}
public void setStatus( String status )
{
this.status = status;
}
public String getCommit_start_date()
{
return commit_start_date;
}
public void setCommit_start_date( String commit_start_date )
{
this.commit_start_date = commit_start_date;
}
public String getCommit_end_date()
{
return commit_end_date;
}
public void setCommit_end_date( String commit_end_date )
{
this.commit_end_date = commit_end_date;
}
@JsonProperty( "title")
private String title;
@JsonProperty( "serial_no")
private String serial_no;
@JsonProperty( "request_people")
private String request_people;
@JsonProperty( "status")
private String status;
@JsonProperty( "commit_start_date")
private String commit_start_date;
@JsonProperty( "commit_end_date")
private String commit_end_date;
}

View File

@ -0,0 +1,45 @@
/*
* @Author: Kane
* @Date: 2023-01-29 16:20:29
* @LastEditors: Kane
* @LastEditTime: 2023-01-29 17:09:59
* @FilePath: \requirement\src\main\java\com\cpic\xim\web\controllers\requirements\response\RequirementQueryResult.java
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
package com.cpic.xim.web.controllers.requirements.response;
import com.fasterxml.jackson.annotation.JsonProperty;
public final class RequirementQueryResult
{
public RequirementQueryResult()
{}
public boolean getSuccess()
{
return success;
}
public void setSuccess( boolean success )
{
this.success = success;
}
public String getMessage()
{
return message;
}
public void setMessage( String message )
{
this.message = message;
}
@JsonProperty( "success" )
private boolean success;
@JsonProperty( "message" )
private String message;
}

View File

@ -0,0 +1,4 @@
#Created by Apache Maven 3.8.6
artifactId=requirement
groupId=com.cpic.xim
version=1.0-SNAPSHOT

View File

@ -0,0 +1,5 @@
com\cpic\xim\web\controllers\requirements\response\RequirementQueryResult.class
com\cpic\xim\web\filters\token\TokenFilter.class
com\cpic\xim\web\controllers\requirements\param\RequirementQueryParam.class
com\cpic\xim\web\filters\cros\CrosFilter.class
com\cpic\xim\web\controllers\requirements\RequirementController.class

View File

@ -0,0 +1,5 @@
D:\develop\cpicxim\it-console\code\java\requirement\src\main\java\com\cpic\xim\web\controllers\requirements\RequirementController.java
D:\develop\cpicxim\it-console\code\java\requirement\src\main\java\com\cpic\xim\web\filters\cros\CrosFilter.java
D:\develop\cpicxim\it-console\code\java\requirement\src\main\java\com\cpic\xim\web\controllers\requirements\param\RequirementQueryParam.java
D:\develop\cpicxim\it-console\code\java\requirement\src\main\java\com\cpic\xim\web\controllers\requirements\response\RequirementQueryResult.java
D:\develop\cpicxim\it-console\code\java\requirement\src\main\java\com\cpic\xim\web\filters\token\TokenFilter.java

View File

@ -0,0 +1,37 @@
<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> -->
<bean id="multipartResolver"
class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<property name="defaultEncoding" value="UTF-8" />
<property name="maxUploadSize" value="-1" />
</bean>
</beans>

View File

@ -0,0 +1,39 @@
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
<display-name>Archetype Created Web Application</display-name>
<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>*.do</url-pattern>
</servlet-mapping>
<filter>
<filter-name>CrosFilter</filter-name>
<filter-class>com.cpic.xim.web.filters.cros.CrosFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>CrosFilter</filter-name>
<url-pattern>*</url-pattern>
</filter-mapping>
<filter>
<filter-name>TokenFilter</filter-name>
<filter-class>com.cpic.xim.web.filters.token.TokenFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>TokenFilter</filter-name>
<url-pattern>*.do</url-pattern>
</filter-mapping>
</web-app>

View File

@ -0,0 +1,5 @@
<html>
<body>
<h2>Hello World!</h2>
</body>
</html>