/*
* Copyright (C) 2019 木子网https://www.xiangcaowuyu.net
* 项目名称:Net.XiangCaoWuYu.Idea
* 文件名称:App.java
* Date:19-7-19 上午1:21
* Author:lisen@lisen.org
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package Net.XiangCaoWuYu;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.orm.jpa.EntityScan;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
@SpringBootApplication
//SpringBoot 默认从App类往下面的包扫描
//所以如果控制器、实体等类与App不在一个包,同时不在下面的包时,必须手动指定包
//@ComponentScan(basePackages = {"Net.XiangCaoWuYu.Controllers", "Net.XiangCaoWuYu.Services"})
//@EnableJpaRepositories(basePackages = {"Net.XiangCaoWuYu.Repositories", "Net.XiangCaoWuYu.Services"})
//@EntityScan(basePackages = {"Net/XiangCaoWuYu/Pojos"})
public class App {
public static void main(String[] args){
SpringApplication.run(App.class,args);
}
}
好