重命名默认数据库名为:csa,重命名组名为com.jlt,重命名包名为com.jlt.csa
SpringBoot启动类,使用@SpringBootApplication的scanBasePackages元素替代@ComponentScan注解。
This commit is contained in:
parent
be13b2ec59
commit
7a3dc7d317
4
pom.xml
4
pom.xml
@ -9,7 +9,7 @@
|
||||
<version>3.8.1</version>
|
||||
|
||||
<name>jlt-private-farm</name>
|
||||
<description>私家农场管理系统</description>
|
||||
<description>私家农场管理系统(CSA,社区支持农业)</description>
|
||||
|
||||
<properties>
|
||||
<private-farm.version>1.0.0</private-farm.version>
|
||||
@ -201,7 +201,7 @@
|
||||
|
||||
<!-- 私家农场 -->
|
||||
<dependency>
|
||||
<groupId>com.jlt.farming</groupId>
|
||||
<groupId>com.jlt</groupId>
|
||||
<artifactId>private-farm</artifactId>
|
||||
<version>${private-farm.version}</version>
|
||||
</dependency>
|
||||
|
@ -9,7 +9,7 @@
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.jlt.farming</groupId>
|
||||
<groupId>com.jlt</groupId>
|
||||
<artifactId>private-farm</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<description>私家农场(社区支持农业)管理系统</description>
|
||||
|
@ -1,10 +1,10 @@
|
||||
package com.jlt.farming.crm.controller;
|
||||
package com.jlt.crm.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.jlt.farming.crm.domain.Visitor;
|
||||
import com.jlt.farming.crm.service.IVisitorService;
|
||||
import com.jlt.crm.domain.Visitor;
|
||||
import com.jlt.crm.service.IVisitorService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
@ -1,4 +1,4 @@
|
||||
package com.jlt.farming.crm.domain;
|
||||
package com.jlt.crm.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
@ -1,7 +1,7 @@
|
||||
package com.jlt.farming.crm.mapper;
|
||||
package com.jlt.crm.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.jlt.farming.crm.domain.Visitor;
|
||||
import com.jlt.crm.domain.Visitor;
|
||||
|
||||
/**
|
||||
* 访客信息Mapper接口
|
@ -1,7 +1,8 @@
|
||||
package com.jlt.farming.crm.service;
|
||||
package com.jlt.crm.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.jlt.farming.crm.domain.Visitor;
|
||||
|
||||
import com.jlt.crm.domain.Visitor;
|
||||
|
||||
/**
|
||||
* 访客信息Service接口
|
@ -1,10 +1,9 @@
|
||||
package com.jlt.farming.crm.service.impl;
|
||||
package com.jlt.crm.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.jlt.farming.crm.domain.Visitor;
|
||||
import com.jlt.farming.crm.mapper.VisitorMapper;
|
||||
import com.jlt.farming.crm.service.IVisitorService;
|
||||
import com.jlt.crm.domain.Visitor;
|
||||
import com.jlt.crm.service.IVisitorService;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -19,7 +18,7 @@ import org.springframework.stereotype.Service;
|
||||
public class VisitorServiceImpl implements IVisitorService
|
||||
{
|
||||
@Autowired
|
||||
private VisitorMapper VisitorMapper;
|
||||
private com.jlt.crm.mapper.VisitorMapper VisitorMapper;
|
||||
|
||||
/**
|
||||
* 查询访客信息
|
@ -2,7 +2,7 @@
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jlt.farming.crm.mapper.VisitorMapper">
|
||||
<mapper namespace="com.jlt.crm.mapper.VisitorMapper">
|
||||
|
||||
<resultMap type="Visitor" id="VisitorResult">
|
||||
<result property="visitorId" column="visitor_id" />
|
||||
|
@ -62,7 +62,7 @@
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.jlt.farming</groupId>
|
||||
<groupId>com.jlt</groupId>
|
||||
<artifactId>private-farm</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
@ -4,21 +4,19 @@ import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
|
||||
/**
|
||||
* 启动程序
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
|
||||
@ComponentScan({"com.ruoyi", "com.jlt.farming"})
|
||||
@MapperScan({"com.jlt.farming.**.mapper"})
|
||||
public class RuoYiApplication
|
||||
{
|
||||
public static void main(String[] args)
|
||||
{
|
||||
// System.setProperty("spring.devtools.restart.enabled", "false");
|
||||
@SpringBootApplication(
|
||||
exclude = {DataSourceAutoConfiguration.class},
|
||||
scanBasePackages = {"com.ruoyi", "com.jlt"})
|
||||
@MapperScan({"com.jlt.**.mapper"})
|
||||
public class RuoYiApplication {
|
||||
public static void main(String[] args) {
|
||||
System.setProperty("spring.devtools.restart.enabled", "false");
|
||||
SpringApplication.run(RuoYiApplication.class, args);
|
||||
System.out.println("(♥◠‿◠)ノ゙ 若依启动成功 ლ(´ڡ`ლ)゙ \n" +
|
||||
" .-------. ____ __ \n" +
|
||||
|
@ -6,7 +6,7 @@ spring:
|
||||
druid:
|
||||
# 主库数据源
|
||||
master:
|
||||
url: jdbc:mysql://localhost:3306/private-farm?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
url: jdbc:mysql://localhost:3306/csa?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: root
|
||||
password: 123456
|
||||
# 从库数据源
|
||||
|
Loading…
x
Reference in New Issue
Block a user