chore: 移除不需要追踪的构建文件
This commit is contained in:
parent
d7aaaa37e2
commit
81ba7ff43f
@ -1,18 +0,0 @@
|
||||
# 数据库配置
|
||||
jdbc.driver=com.mysql.cj.jdbc.Driver
|
||||
jdbc.url=jdbc:mysql://host.docker.internal:3306/llm_survey?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
|
||||
jdbc.username=dev
|
||||
jdbc.password=
|
||||
|
||||
# 连接池配置
|
||||
jdbc.pool.minimumIdle=5
|
||||
jdbc.pool.maximumPoolSize=20
|
||||
jdbc.pool.idleTimeout=300000
|
||||
jdbc.pool.connectionTimeout=20000
|
||||
jdbc.pool.connectionTestQuery=SELECT 1
|
||||
|
||||
# 日志配置
|
||||
logging.level.root=INFO
|
||||
logging.level.ltd.qubit.survey=DEBUG
|
||||
logging.level.org.springframework=INFO
|
||||
logging.level.org.mybatis=DEBUG
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,83 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="ltd.qubit.survey.dao.OptionDao">
|
||||
<!-- 结果映射 -->
|
||||
<resultMap id="optionMap" type="ltd.qubit.survey.model.Option">
|
||||
<id property="id" column="id"/>
|
||||
<result property="questionId" column="question_id"/>
|
||||
<result property="optionCode" column="option_code"/>
|
||||
<result property="content" column="content"/>
|
||||
<result property="requiresText" column="requires_text"/>
|
||||
<result property="createdAt" column="created_at"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 基础列 -->
|
||||
<sql id="baseColumns">
|
||||
`id`, `question_id`, `option_code`, `content`, `requires_text`, `created_at`
|
||||
</sql>
|
||||
|
||||
<!-- 插入 -->
|
||||
<insert id="insert" parameterType="ltd.qubit.survey.model.Option" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`)
|
||||
VALUES (#{questionId}, #{optionCode}, #{content}, #{requiresText})
|
||||
</insert>
|
||||
|
||||
<!-- 批量插入 -->
|
||||
<insert id="batchInsert" parameterType="java.util.List">
|
||||
INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.questionId}, #{item.optionCode}, #{item.content}, #{item.requiresText})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<!-- 更新 -->
|
||||
<update id="update" parameterType="ltd.qubit.survey.model.Option">
|
||||
UPDATE `option`
|
||||
SET `question_id` = #{questionId},
|
||||
`option_code` = #{optionCode},
|
||||
`content` = #{content},
|
||||
`requires_text` = #{requiresText}
|
||||
WHERE `id` = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 删除 -->
|
||||
<delete id="deleteById" parameterType="long">
|
||||
DELETE FROM `option` WHERE `id` = #{id}
|
||||
</delete>
|
||||
|
||||
<!-- 根据问题ID删除 -->
|
||||
<delete id="deleteByQuestionId" parameterType="long">
|
||||
DELETE FROM `option` WHERE `question_id` = #{questionId}
|
||||
</delete>
|
||||
|
||||
<!-- 根据ID查询 -->
|
||||
<select id="findById" parameterType="long" resultMap="optionMap">
|
||||
SELECT <include refid="baseColumns"/>
|
||||
FROM `option`
|
||||
WHERE `id` = #{id}
|
||||
</select>
|
||||
|
||||
<!-- 查询所有 -->
|
||||
<select id="findAll" resultMap="optionMap">
|
||||
SELECT <include refid="baseColumns"/>
|
||||
FROM `option`
|
||||
ORDER BY `question_id`, `option_code`
|
||||
</select>
|
||||
|
||||
<!-- 根据问题ID查询 -->
|
||||
<select id="findByQuestionId" parameterType="long" resultMap="optionMap">
|
||||
SELECT <include refid="baseColumns"/>
|
||||
FROM `option`
|
||||
WHERE `question_id` = #{questionId}
|
||||
ORDER BY `option_code`
|
||||
</select>
|
||||
|
||||
<!-- 根据问题ID和选项代码查询 -->
|
||||
<select id="findByQuestionIdAndOptionCode" resultMap="optionMap">
|
||||
SELECT <include refid="baseColumns"/>
|
||||
FROM `option`
|
||||
WHERE `question_id` = #{questionId}
|
||||
AND `option_code` = #{optionCode}
|
||||
</select>
|
||||
</mapper>
|
||||
@ -1,79 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="ltd.qubit.survey.dao.QuestionDao">
|
||||
<!-- 结果映射 -->
|
||||
<resultMap id="questionMap" type="ltd.qubit.survey.model.Question">
|
||||
<id property="id" column="id"/>
|
||||
<result property="number" column="number"/>
|
||||
<result property="content" column="content"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="isRequired" column="is_required"/>
|
||||
<result property="next" column="next" typeHandler="ltd.qubit.survey.common.mybatis.JsonTypeHandler"/>
|
||||
<result property="isLast" column="is_last"/>
|
||||
<result property="createdAt" column="created_at"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 基础列 -->
|
||||
<sql id="baseColumns">
|
||||
`id`, `number`, `content`, `type`, `is_required`, `next`, `is_last`, `created_at`
|
||||
</sql>
|
||||
|
||||
<!-- 插入 -->
|
||||
<insert id="insert" parameterType="ltd.qubit.survey.model.Question" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO `question` (`number`, `content`, `type`, `is_required`, `next`, `is_last`)
|
||||
VALUES (#{number}, #{content}, #{type}, #{isRequired},
|
||||
#{next,typeHandler=ltd.qubit.survey.common.mybatis.JsonTypeHandler},
|
||||
#{isLast})
|
||||
</insert>
|
||||
|
||||
<!-- 更新 -->
|
||||
<update id="update" parameterType="ltd.qubit.survey.model.Question">
|
||||
UPDATE `question`
|
||||
SET `number` = #{number},
|
||||
`content` = #{content},
|
||||
`type` = #{type},
|
||||
`is_required` = #{isRequired},
|
||||
`next` = #{next,typeHandler=ltd.qubit.survey.common.mybatis.JsonTypeHandler},
|
||||
`is_last` = #{isLast}
|
||||
WHERE `id` = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 删除 -->
|
||||
<delete id="deleteById" parameterType="long">
|
||||
DELETE FROM `question` WHERE `id` = #{id}
|
||||
</delete>
|
||||
|
||||
<!-- 根据ID查询 -->
|
||||
<select id="findById" parameterType="long" resultMap="questionMap">
|
||||
SELECT <include refid="baseColumns"/>
|
||||
FROM `question`
|
||||
WHERE `id` = #{id}
|
||||
</select>
|
||||
|
||||
<!-- 查询所有 -->
|
||||
<select id="findAll" resultMap="questionMap">
|
||||
SELECT <include refid="baseColumns"/>
|
||||
FROM `question`
|
||||
ORDER BY `number`
|
||||
</select>
|
||||
|
||||
<!-- 根据问题序号查询 -->
|
||||
<select id="findByQuestionNumber" parameterType="int" resultMap="questionMap">
|
||||
SELECT <include refid="baseColumns"/>
|
||||
FROM `question`
|
||||
WHERE `number` = #{number}
|
||||
</select>
|
||||
|
||||
<!-- 查询通用问题 -->
|
||||
<select id="findCommonQuestions" resultMap="questionMap">
|
||||
SELECT <include refid="baseColumns"/>
|
||||
FROM `question`
|
||||
ORDER BY `number`
|
||||
</select>
|
||||
|
||||
<!-- 获取下一个问题序号 -->
|
||||
<select id="getNextQuestionNumber" resultType="int">
|
||||
SELECT COALESCE(MAX(`number`) + 1, 1)
|
||||
FROM `question`
|
||||
</select>
|
||||
</mapper>
|
||||
@ -1,93 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="ltd.qubit.survey.dao.SurveyResponseDao">
|
||||
<!-- 结果映射 -->
|
||||
<resultMap id="responseMap" type="ltd.qubit.survey.model.SurveyResponse">
|
||||
<id property="id" column="id"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="questionId" column="question_id"/>
|
||||
<result property="selectedOptions" column="selected_options" typeHandler="ltd.qubit.survey.common.mybatis.JsonTypeHandler"/>
|
||||
<result property="textAnswer" column="text_answer"/>
|
||||
<result property="createdAt" column="created_at"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 基础列 -->
|
||||
<sql id="baseColumns">
|
||||
`id`, `user_id`, `question_id`, `selected_options`, `text_answer`, `created_at`
|
||||
</sql>
|
||||
|
||||
<!-- 插入 -->
|
||||
<insert id="insert" parameterType="ltd.qubit.survey.model.SurveyResponse" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO `survey_response` (`user_id`, `question_id`, `selected_options`, `text_answer`)
|
||||
VALUES (#{userId}, #{questionId}, #{selectedOptions,typeHandler=ltd.qubit.survey.common.mybatis.JsonTypeHandler}, #{textAnswer})
|
||||
</insert>
|
||||
|
||||
<!-- 批量插入 -->
|
||||
<insert id="batchInsert" parameterType="java.util.List">
|
||||
INSERT INTO `survey_response` (`user_id`, `question_id`, `selected_options`, `text_answer`)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.userId}, #{item.questionId},
|
||||
#{item.selectedOptions,typeHandler=ltd.qubit.survey.common.mybatis.JsonTypeHandler},
|
||||
#{item.textAnswer})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<!-- 更新 -->
|
||||
<update id="update" parameterType="ltd.qubit.survey.model.SurveyResponse">
|
||||
UPDATE `survey_response`
|
||||
SET `user_id` = #{userId},
|
||||
`question_id` = #{questionId},
|
||||
`selected_options` = #{selectedOptions,typeHandler=ltd.qubit.survey.common.mybatis.JsonTypeHandler},
|
||||
`text_answer` = #{textAnswer}
|
||||
WHERE `id` = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 删除 -->
|
||||
<delete id="deleteById" parameterType="long">
|
||||
DELETE FROM `survey_response` WHERE `id` = #{id}
|
||||
</delete>
|
||||
|
||||
<!-- 根据用户ID删除 -->
|
||||
<delete id="deleteByUserId" parameterType="long">
|
||||
DELETE FROM `survey_response` WHERE `user_id` = #{userId}
|
||||
</delete>
|
||||
|
||||
<!-- 根据ID查询 -->
|
||||
<select id="findById" parameterType="long" resultMap="responseMap">
|
||||
SELECT <include refid="baseColumns"/>
|
||||
FROM `survey_response`
|
||||
WHERE `id` = #{id}
|
||||
</select>
|
||||
|
||||
<!-- 查询所有 -->
|
||||
<select id="findAll" resultMap="responseMap">
|
||||
SELECT <include refid="baseColumns"/>
|
||||
FROM `survey_response`
|
||||
ORDER BY `user_id`, `question_id`
|
||||
</select>
|
||||
|
||||
<!-- 根据用户ID查询 -->
|
||||
<select id="findByUserId" parameterType="long" resultMap="responseMap">
|
||||
SELECT <include refid="baseColumns"/>
|
||||
FROM `survey_response`
|
||||
WHERE `user_id` = #{userId}
|
||||
ORDER BY `question_id`
|
||||
</select>
|
||||
|
||||
<!-- 根据问题ID查询 -->
|
||||
<select id="findByQuestionId" parameterType="long" resultMap="responseMap">
|
||||
SELECT <include refid="baseColumns"/>
|
||||
FROM `survey_response`
|
||||
WHERE `question_id` = #{questionId}
|
||||
ORDER BY `user_id`
|
||||
</select>
|
||||
|
||||
<!-- 根据用户ID和问题ID查询 -->
|
||||
<select id="findByUserIdAndQuestionId" resultMap="responseMap">
|
||||
SELECT <include refid="baseColumns"/>
|
||||
FROM `survey_response`
|
||||
WHERE `user_id` = #{userId}
|
||||
AND `question_id` = #{questionId}
|
||||
</select>
|
||||
</mapper>
|
||||
@ -1,58 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="ltd.qubit.survey.dao.UserDao">
|
||||
<!-- 结果映射 -->
|
||||
<resultMap id="userMap" type="ltd.qubit.survey.model.User">
|
||||
<id property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="phone" column="phone"/>
|
||||
<result property="positionType" column="position_type"/>
|
||||
<result property="createdAt" column="created_at"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 基础列 -->
|
||||
<sql id="baseColumns">
|
||||
`id`, `name`, `phone`, `position_type`, `created_at`
|
||||
</sql>
|
||||
|
||||
<!-- 插入 -->
|
||||
<insert id="insert" parameterType="ltd.qubit.survey.model.User" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO `user` (`name`, `phone`, `position_type`)
|
||||
VALUES (#{name}, #{phone}, #{positionType})
|
||||
</insert>
|
||||
|
||||
<!-- 更新 -->
|
||||
<update id="update" parameterType="ltd.qubit.survey.model.User">
|
||||
UPDATE `user`
|
||||
SET `name` = #{name},
|
||||
`phone` = #{phone},
|
||||
`position_type` = #{positionType}
|
||||
WHERE `id` = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 删除 -->
|
||||
<delete id="deleteById" parameterType="long">
|
||||
DELETE FROM `user` WHERE `id` = #{id}
|
||||
</delete>
|
||||
|
||||
<!-- 根据ID查询 -->
|
||||
<select id="findById" parameterType="long" resultMap="userMap">
|
||||
SELECT <include refid="baseColumns"/>
|
||||
FROM `user`
|
||||
WHERE `id` = #{id}
|
||||
</select>
|
||||
|
||||
<!-- 查询所有 -->
|
||||
<select id="findAll" resultMap="userMap">
|
||||
SELECT <include refid="baseColumns"/>
|
||||
FROM `user`
|
||||
ORDER BY `id`
|
||||
</select>
|
||||
|
||||
<!-- 根据手机号查询 -->
|
||||
<select id="findByPhone" parameterType="string" resultMap="userMap">
|
||||
SELECT <include refid="baseColumns"/>
|
||||
FROM `user`
|
||||
WHERE `phone` = #{phone}
|
||||
</select>
|
||||
</mapper>
|
||||
@ -1,41 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
|
||||
<configuration>
|
||||
<settings>
|
||||
<!-- 开启驼峰命名自动映射 -->
|
||||
<setting name="mapUnderscoreToCamelCase" value="true"/>
|
||||
<!-- 开启二级缓存 -->
|
||||
<setting name="cacheEnabled" value="true"/>
|
||||
<!-- 开启延迟加载 -->
|
||||
<setting name="lazyLoadingEnabled" value="true"/>
|
||||
<!-- 设置日志实现 -->
|
||||
<setting name="logImpl" value="SLF4J"/>
|
||||
</settings>
|
||||
|
||||
<!-- 类型别名配置 -->
|
||||
<typeAliases>
|
||||
<package name="ltd.qubit.survey.model"/>
|
||||
</typeAliases>
|
||||
|
||||
<!-- 类型处理器配置 -->
|
||||
<typeHandlers>
|
||||
<!-- 枚举类型处理器 -->
|
||||
<typeHandler handler="org.apache.ibatis.type.EnumTypeHandler"
|
||||
javaType="ltd.qubit.survey.model.WorkArea"/>
|
||||
<typeHandler handler="org.apache.ibatis.type.EnumTypeHandler"
|
||||
javaType="ltd.qubit.survey.model.PositionType"/>
|
||||
<typeHandler handler="org.apache.ibatis.type.EnumTypeHandler"
|
||||
javaType="ltd.qubit.survey.model.QuestionType"/>
|
||||
<!-- JSON类型处理器 -->
|
||||
<typeHandler handler="ltd.qubit.survey.common.mybatis.JsonTypeHandler"
|
||||
javaType="java.util.List"/>
|
||||
<!-- Instant类型处理器 -->
|
||||
<typeHandler handler="ltd.qubit.survey.common.mybatis.InstantTypeHandler"
|
||||
javaType="java.time.Instant"/>
|
||||
</typeHandlers>
|
||||
|
||||
<!-- 映射器配置 -->
|
||||
<mappers>
|
||||
<package name="ltd.qubit.survey.dao"/>
|
||||
</mappers>
|
||||
</configuration>
|
||||
@ -1,47 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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:tx="http://www.springframework.org/schema/tx"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context.xsd
|
||||
http://www.springframework.org/schema/tx
|
||||
http://www.springframework.org/schema/tx/spring-tx.xsd
|
||||
http://www.springframework.org/schema/aop
|
||||
http://www.springframework.org/schema/aop/spring-aop.xsd">
|
||||
|
||||
<!-- 加载属性文件 -->
|
||||
<context:property-placeholder location="classpath:application.properties"/>
|
||||
|
||||
<!-- 配置自定义ObjectMapper -->
|
||||
<bean id="objectMapper" class="ltd.qubit.survey.utils.CustomObjectMapper" primary="true"/>
|
||||
|
||||
<!-- 开启注解扫描,排除Controller -->
|
||||
<context:component-scan base-package="ltd.qubit.survey">
|
||||
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
|
||||
</context:component-scan>
|
||||
|
||||
<!-- 配置事务注解驱动 -->
|
||||
<tx:annotation-driven/>
|
||||
|
||||
<!-- 配置事务通知 -->
|
||||
<tx:advice id="txAdvice" transaction-manager="transactionManager">
|
||||
<tx:attributes>
|
||||
<tx:method name="get*" read-only="true"/>
|
||||
<tx:method name="find*" read-only="true"/>
|
||||
<tx:method name="list*" read-only="true"/>
|
||||
<tx:method name="query*" read-only="true"/>
|
||||
<tx:method name="*" propagation="REQUIRED"/>
|
||||
</tx:attributes>
|
||||
</tx:advice>
|
||||
|
||||
<!-- 配置事务切面 -->
|
||||
<aop:config>
|
||||
<aop:pointcut id="txPointcut" expression="execution(* ltd.qubit.survey.service..*.*(..))"/>
|
||||
<aop:advisor advice-ref="txAdvice" pointcut-ref="txPointcut"/>
|
||||
</aop:config>
|
||||
|
||||
</beans>
|
||||
@ -1,58 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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:mvc="http://www.springframework.org/schema/mvc"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context.xsd
|
||||
http://www.springframework.org/schema/mvc
|
||||
http://www.springframework.org/schema/mvc/spring-mvc.xsd">
|
||||
|
||||
<!-- 开启Controller注解扫描 -->
|
||||
<context:component-scan base-package="ltd.qubit.survey.controller" use-default-filters="false">
|
||||
<context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
|
||||
</context:component-scan>
|
||||
|
||||
<!-- 开启SpringMVC注解驱动 -->
|
||||
<mvc:annotation-driven>
|
||||
<mvc:message-converters>
|
||||
<!-- 配置JSON转换器 -->
|
||||
<bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter">
|
||||
<property name="objectMapper" ref="objectMapper"/>
|
||||
<property name="supportedMediaTypes">
|
||||
<list>
|
||||
<value>application/json;charset=UTF-8</value>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
<!-- 配置字符串转换器 -->
|
||||
<bean class="org.springframework.http.converter.StringHttpMessageConverter">
|
||||
<property name="supportedMediaTypes">
|
||||
<list>
|
||||
<value>text/plain;charset=UTF-8</value>
|
||||
<value>text/html;charset=UTF-8</value>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
</mvc:message-converters>
|
||||
</mvc:annotation-driven>
|
||||
|
||||
<!-- 配置静态资源处理 -->
|
||||
<mvc:default-servlet-handler/>
|
||||
|
||||
<!-- 配置跨域支持 -->
|
||||
<mvc:cors>
|
||||
<mvc:mapping path="/**"
|
||||
allowed-origins="http://localhost:3000,http://localhost:8080"
|
||||
allowed-methods="GET,POST,PUT,DELETE,OPTIONS"
|
||||
allowed-headers="Content-Type,X-Requested-With,accept,Origin,Access-Control-Request-Method,Access-Control-Request-Headers"
|
||||
allow-credentials="true"
|
||||
max-age="3600"/>
|
||||
</mvc:cors>
|
||||
|
||||
<!-- 配置异常处理器 -->
|
||||
<bean class="ltd.qubit.survey.controller.GlobalExceptionHandler"/>
|
||||
|
||||
</beans>
|
||||
@ -1,64 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:tx="http://www.springframework.org/schema/tx"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/tx
|
||||
http://www.springframework.org/schema/tx/spring-tx.xsd">
|
||||
|
||||
<!-- 配置数据源 -->
|
||||
<bean id="dataSource" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
|
||||
<property name="driverClassName" value="${jdbc.driver}"/>
|
||||
<property name="jdbcUrl" value="${jdbc.url}"/>
|
||||
<property name="username" value="${jdbc.username}"/>
|
||||
<property name="password" value="${jdbc.password}"/>
|
||||
<!-- 连接池配置 -->
|
||||
<property name="minimumIdle" value="${jdbc.pool.minimumIdle}"/>
|
||||
<property name="maximumPoolSize" value="${jdbc.pool.maximumPoolSize}"/>
|
||||
<property name="idleTimeout" value="${jdbc.pool.idleTimeout}"/>
|
||||
<property name="connectionTimeout" value="${jdbc.pool.connectionTimeout}"/>
|
||||
<property name="connectionTestQuery" value="${jdbc.pool.connectionTestQuery}"/>
|
||||
<!-- 其他配置 -->
|
||||
<property name="autoCommit" value="true"/>
|
||||
<property name="poolName" value="HikariPool-Survey"/>
|
||||
<property name="maxLifetime" value="1800000"/>
|
||||
<property name="validationTimeout" value="5000"/>
|
||||
<property name="leakDetectionThreshold" value="60000"/>
|
||||
</bean>
|
||||
|
||||
<!-- 配置SqlSessionFactory -->
|
||||
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
|
||||
<property name="dataSource" ref="dataSource"/>
|
||||
<property name="configLocation" value="classpath:mybatis/mybatis-config.xml"/>
|
||||
<property name="mapperLocations" value="classpath*:mybatis/mapper/*.xml"/>
|
||||
<!-- 配置插件 -->
|
||||
<property name="plugins">
|
||||
<array>
|
||||
<!-- 分页插件 -->
|
||||
<bean class="com.github.pagehelper.PageInterceptor">
|
||||
<property name="properties">
|
||||
<value>
|
||||
helperDialect=mysql
|
||||
reasonable=true
|
||||
supportMethodsArguments=true
|
||||
params=count=countSql
|
||||
</value>
|
||||
</property>
|
||||
</bean>
|
||||
</array>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- 配置Mapper扫描器 -->
|
||||
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
|
||||
<property name="basePackage" value="ltd.qubit.survey.dao"/>
|
||||
<property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
|
||||
</bean>
|
||||
|
||||
<!-- 配置事务管理器 -->
|
||||
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
|
||||
<property name="dataSource" ref="dataSource"/>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
@ -1,29 +0,0 @@
|
||||
ltd/qubit/survey/common/mybatis/InstantTypeHandler.class
|
||||
ltd/qubit/survey/controller/GlobalExceptionHandler.class
|
||||
ltd/qubit/survey/dao/QuestionDao.class
|
||||
ltd/qubit/survey/model/PositionType.class
|
||||
ltd/qubit/survey/service/OptionService.class
|
||||
ltd/qubit/survey/controller/UserController.class
|
||||
ltd/qubit/survey/service/impl/SurveyResponseServiceImpl.class
|
||||
ltd/qubit/survey/dao/SurveyResponseDao.class
|
||||
ltd/qubit/survey/dao/OptionDao.class
|
||||
ltd/qubit/survey/controller/QuestionController.class
|
||||
ltd/qubit/survey/service/impl/UserServiceImpl.class
|
||||
ltd/qubit/survey/service/impl/QuestionServiceImpl.class
|
||||
ltd/qubit/survey/model/SurveyResponse.class
|
||||
ltd/qubit/survey/utils/CustomObjectMapper.class
|
||||
ltd/qubit/survey/model/User.class
|
||||
ltd/qubit/survey/service/QuestionService.class
|
||||
ltd/qubit/survey/common/mybatis/JsonTypeHandler.class
|
||||
ltd/qubit/survey/service/UserService.class
|
||||
ltd/qubit/survey/dao/BaseDao.class
|
||||
ltd/qubit/survey/service/impl/OptionServiceImpl.class
|
||||
ltd/qubit/survey/dao/UserDao.class
|
||||
ltd/qubit/survey/model/ErrorInfo.class
|
||||
ltd/qubit/survey/controller/SurveyController.class
|
||||
ltd/qubit/survey/model/Question.class
|
||||
ltd/qubit/survey/model/WorkArea.class
|
||||
ltd/qubit/survey/service/SurveyResponseService.class
|
||||
ltd/qubit/survey/model/Option.class
|
||||
ltd/qubit/survey/model/QuestionType.class
|
||||
ltd/qubit/survey/service/BaseService.class
|
||||
@ -1,29 +0,0 @@
|
||||
/Volumes/working/qubit/project/llm-survey/backend/src/main/java/ltd/qubit/survey/dao/QuestionDao.java
|
||||
/Volumes/working/qubit/project/llm-survey/backend/src/main/java/ltd/qubit/survey/service/UserService.java
|
||||
/Volumes/working/qubit/project/llm-survey/backend/src/main/java/ltd/qubit/survey/service/OptionService.java
|
||||
/Volumes/working/qubit/project/llm-survey/backend/src/main/java/ltd/qubit/survey/common/mybatis/JsonTypeHandler.java
|
||||
/Volumes/working/qubit/project/llm-survey/backend/src/main/java/ltd/qubit/survey/model/Question.java
|
||||
/Volumes/working/qubit/project/llm-survey/backend/src/main/java/ltd/qubit/survey/service/QuestionService.java
|
||||
/Volumes/working/qubit/project/llm-survey/backend/src/main/java/ltd/qubit/survey/service/BaseService.java
|
||||
/Volumes/working/qubit/project/llm-survey/backend/src/main/java/ltd/qubit/survey/model/User.java
|
||||
/Volumes/working/qubit/project/llm-survey/backend/src/main/java/ltd/qubit/survey/service/impl/OptionServiceImpl.java
|
||||
/Volumes/working/qubit/project/llm-survey/backend/src/main/java/ltd/qubit/survey/service/impl/QuestionServiceImpl.java
|
||||
/Volumes/working/qubit/project/llm-survey/backend/src/main/java/ltd/qubit/survey/common/mybatis/InstantTypeHandler.java
|
||||
/Volumes/working/qubit/project/llm-survey/backend/src/main/java/ltd/qubit/survey/service/SurveyResponseService.java
|
||||
/Volumes/working/qubit/project/llm-survey/backend/src/main/java/ltd/qubit/survey/model/Option.java
|
||||
/Volumes/working/qubit/project/llm-survey/backend/src/main/java/ltd/qubit/survey/controller/GlobalExceptionHandler.java
|
||||
/Volumes/working/qubit/project/llm-survey/backend/src/main/java/ltd/qubit/survey/model/QuestionType.java
|
||||
/Volumes/working/qubit/project/llm-survey/backend/src/main/java/ltd/qubit/survey/dao/UserDao.java
|
||||
/Volumes/working/qubit/project/llm-survey/backend/src/main/java/ltd/qubit/survey/model/SurveyResponse.java
|
||||
/Volumes/working/qubit/project/llm-survey/backend/src/main/java/ltd/qubit/survey/service/impl/SurveyResponseServiceImpl.java
|
||||
/Volumes/working/qubit/project/llm-survey/backend/src/main/java/ltd/qubit/survey/model/ErrorInfo.java
|
||||
/Volumes/working/qubit/project/llm-survey/backend/src/main/java/ltd/qubit/survey/controller/UserController.java
|
||||
/Volumes/working/qubit/project/llm-survey/backend/src/main/java/ltd/qubit/survey/service/impl/UserServiceImpl.java
|
||||
/Volumes/working/qubit/project/llm-survey/backend/src/main/java/ltd/qubit/survey/dao/SurveyResponseDao.java
|
||||
/Volumes/working/qubit/project/llm-survey/backend/src/main/java/ltd/qubit/survey/controller/QuestionController.java
|
||||
/Volumes/working/qubit/project/llm-survey/backend/src/main/java/ltd/qubit/survey/model/WorkArea.java
|
||||
/Volumes/working/qubit/project/llm-survey/backend/src/main/java/ltd/qubit/survey/utils/CustomObjectMapper.java
|
||||
/Volumes/working/qubit/project/llm-survey/backend/src/main/java/ltd/qubit/survey/model/PositionType.java
|
||||
/Volumes/working/qubit/project/llm-survey/backend/src/main/java/ltd/qubit/survey/dao/BaseDao.java
|
||||
/Volumes/working/qubit/project/llm-survey/backend/src/main/java/ltd/qubit/survey/controller/SurveyController.java
|
||||
/Volumes/working/qubit/project/llm-survey/backend/src/main/java/ltd/qubit/survey/dao/OptionDao.java
|
||||
Loading…
Reference in New Issue
Block a user