重命名默认数据库名为:csa,重命名组名为com.jlt,重命名包名为com.jlt.csa
SpringBoot启动类,使用@SpringBootApplication的scanBasePackages元素替代@ComponentScan注解。
This commit is contained in:
@ -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
|
||||
# 从库数据源
|
||||
|
Reference in New Issue
Block a user