Skip to content

Commit

Permalink
package name changed.
Browse files Browse the repository at this point in the history
  • Loading branch information
liuruibin committed Feb 3, 2020
1 parent 253a7da commit 8830231
Show file tree
Hide file tree
Showing 27 changed files with 124 additions and 192 deletions.
11 changes: 5 additions & 6 deletions backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<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/xsd/maven-4.0.0.xsd">


<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.2.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
<artifactId>metersphere-server</artifactId>
<groupId>io.metersphere</groupId>
<version>1.0</version>
</parent>

<modelVersion>4.0.0</modelVersion>

<artifactId>backend</artifactId>

<properties>
Expand Down Expand Up @@ -252,5 +252,4 @@
</build>



</project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fit2cloud.metersphere;
package io.metersphere;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fit2cloud.metersphere.base.domain;
package io.metersphere.base.domain;

import java.io.Serializable;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fit2cloud.metersphere.base.domain;
package io.metersphere.base.domain;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.fit2cloud.metersphere.base.mapper;
package io.metersphere.base.mapper;

import com.fit2cloud.metersphere.base.domain.User;
import com.fit2cloud.metersphere.base.domain.UserExample;
import io.metersphere.base.domain.User;
import io.metersphere.base.domain.UserExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?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="com.fit2cloud.metersphere.base.mapper.UserMapper">
<resultMap id="BaseResultMap" type="com.fit2cloud.metersphere.base.domain.User">
<mapper namespace="io.metersphere.base.mapper.UserMapper">
<resultMap id="BaseResultMap" type="io.metersphere.base.domain.User">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="email" jdbcType="VARCHAR" property="email" />
Expand Down Expand Up @@ -71,7 +71,7 @@
<sql id="Base_Column_List">
id, name, email, phone, status, create_time, update_time
</sql>
<select id="selectByExample" parameterType="com.fit2cloud.metersphere.base.domain.UserExample" resultMap="BaseResultMap">
<select id="selectByExample" parameterType="io.metersphere.base.domain.UserExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
Expand All @@ -95,21 +95,21 @@
delete from user
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="com.fit2cloud.metersphere.base.domain.UserExample">
<delete id="deleteByExample" parameterType="io.metersphere.base.domain.UserExample">
delete from user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.fit2cloud.metersphere.base.domain.User">
<insert id="insert" parameterType="io.metersphere.base.domain.User">
insert into user (id, name, email,
phone, status, create_time,
update_time)
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR},
#{phone,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT},
#{updateTime,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.fit2cloud.metersphere.base.domain.User">
<insert id="insertSelective" parameterType="io.metersphere.base.domain.User">
insert into user
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
Expand Down Expand Up @@ -158,7 +158,7 @@
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.fit2cloud.metersphere.base.domain.UserExample" resultType="java.lang.Long">
<select id="countByExample" parameterType="io.metersphere.base.domain.UserExample" resultType="java.lang.Long">
select count(*) from user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
Expand Down Expand Up @@ -206,7 +206,7 @@
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.fit2cloud.metersphere.base.domain.User">
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.base.domain.User">
update user
<set>
<if test="name != null">
Expand All @@ -230,7 +230,7 @@
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.fit2cloud.metersphere.base.domain.User">
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.User">
update user
set name = #{name,jdbcType=VARCHAR},
email = #{email,jdbcType=VARCHAR},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fit2cloud.metersphere.config;
package io.metersphere.config;

import com.github.pagehelper.PageInterceptor;
import org.mybatis.spring.annotation.MapperScan;
Expand All @@ -11,7 +11,7 @@
import java.util.Properties;

@Configuration
@MapperScan(basePackages = "com.fit2cloud.metersphere.base.mapper", sqlSessionFactoryRef = "sqlSessionFactory")
@MapperScan(basePackages = "io.metersphere.base.mapper", sqlSessionFactoryRef = "sqlSessionFactory")
@EnableTransactionManagement
@PropertySource(value = {"file:/opt/fit2cloud/conf/metersphere.properties"}, encoding = "UTF-8", ignoreResourceNotFound = true)
public class MybatisConfig {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.fit2cloud.metersphere.config;
package io.metersphere.config;

import at.pollux.thymeleaf.shiro.dialect.ShiroDialect;
import com.fit2cloud.metersphere.security.LoginFilter;
import com.fit2cloud.metersphere.security.ShiroDBRealm;
import io.metersphere.security.LoginFilter;
import io.metersphere.security.ShiroDBRealm;
import org.apache.shiro.cache.MemoryConstrainedCacheManager;
import org.apache.shiro.session.mgt.SessionManager;
import org.apache.shiro.spring.LifecycleBeanPostProcessor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.fit2cloud.metersphere.config;
package io.metersphere.config;

import com.fit2cloud.metersphere.interceptor.TestInterceptor;
import io.metersphere.interceptor.TestInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fit2cloud.metersphere.config;
package io.metersphere.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.fit2cloud.metersphere.controller;
package io.metersphere.controller;

import com.fit2cloud.metersphere.user.SessionUtils;
import io.metersphere.user.SessionUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.fit2cloud.metersphere.controller;
package io.metersphere.controller;

import com.fit2cloud.metersphere.controller.request.LoginRequest;
import io.metersphere.controller.request.LoginRequest;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fit2cloud.metersphere.controller;
package io.metersphere.controller;

import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.fit2cloud.metersphere.controller;
package io.metersphere.controller;

import com.fit2cloud.metersphere.user.SessionUtils;
import io.metersphere.user.SessionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fit2cloud.metersphere.controller.request;
package io.metersphere.controller.request;

public class LoginRequest {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fit2cloud.metersphere.interceptor;
package io.metersphere.interceptor;

import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerInterceptor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.fit2cloud.metersphere.security;
package io.metersphere.security;

import com.alibaba.fastjson.JSONObject;
import com.fit2cloud.metersphere.controller.ResultHolder;
import io.metersphere.controller.ResultHolder;
import org.apache.shiro.web.filter.authc.FormAuthenticationFilter;

import javax.servlet.ServletRequest;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.fit2cloud.metersphere.security;
package io.metersphere.security;


import com.fit2cloud.metersphere.user.SessionUser;
import io.metersphere.user.SessionUser;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.*;
import org.apache.shiro.authz.AuthorizationInfo;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fit2cloud.metersphere.user;
package io.metersphere.user;

import java.io.Serializable;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fit2cloud.metersphere.user;
package io.metersphere.user;

import org.apache.shiro.SecurityUtils;
import org.apache.shiro.session.Session;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.fit2cloud.metersphere.websocket;
package io.metersphere.websocket;

import com.fit2cloud.metersphere.user.SessionUtils;
import io.metersphere.user.SessionUtils;

import javax.websocket.HandshakeResponse;
import javax.websocket.server.HandshakeRequest;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.fit2cloud.metersphere.websocket;
package io.metersphere.websocket;

import com.fit2cloud.metersphere.user.SessionUtils;
import io.metersphere.user.SessionUtils;
import org.springframework.stereotype.Component;

import javax.websocket.*;
Expand Down
1 change: 0 additions & 1 deletion backend/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,5 @@ mybatis.configuration.multiple-result-sets-enabled=true
mybatis.configuration.use-column-label=true
mybatis.configuration.auto-mapping-behavior=full
mybatis.configuration.default-statement-timeout=25000
mybatis.mapper-locations=classpath:mybatis/**/*.xml,classpath*:com/fit2cloud/metersphere/mapper/**/*.xml

logging.file.path=/opt/fit2cloud/logs/${spring.application.name}
6 changes: 3 additions & 3 deletions backend/src/main/resources/generatorConfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@
<property name="forceBigDecimals" value="false"/>
</javaTypeResolver>
<!-- 模型对象 -->
<javaModelGenerator targetPackage="com.fit2cloud.metersphere.base.domain" targetProject="src/main/java">
<javaModelGenerator targetPackage="io.metersphere.base.domain" targetProject="src/main/java">
<property name="enableSubPackages" value="true"/>
<property name="trimStrings" value="true"/>
</javaModelGenerator>
<!-- XML映射文件 -->
<sqlMapGenerator targetPackage="com.fit2cloud.metersphere.base.mapper" targetProject="src/main/java">
<sqlMapGenerator targetPackage="io.metersphere.base.mapper" targetProject="src/main/java">
<property name="enableSubPackages" value="true"/>
</sqlMapGenerator>
<!-- 接口 -->
<javaClientGenerator type="XMLMAPPER" targetPackage="com.fit2cloud.metersphere.base.mapper"
<javaClientGenerator type="XMLMAPPER" targetPackage="io.metersphere.base.mapper"
targetProject="src/main/java">
<property name="enableSubPackages" value="true"/>
</javaClientGenerator>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.fit2cloud.metersphere;
package io.metersphere;


import com.fit2cloud.metersphere.base.domain.User;
import com.fit2cloud.metersphere.base.mapper.UserMapper;
import io.metersphere.base.domain.User;
import io.metersphere.base.mapper.UserMapper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
Expand Down
Loading

0 comments on commit 8830231

Please sign in to comment.