Java配置修改
This commit is contained in:
parent
14c26ad6a2
commit
d918b0c818
@ -1,17 +1,13 @@
|
|||||||
package com.macro.mall;
|
package com.macro.mall;
|
||||||
|
|
||||||
import org.mybatis.spring.annotation.MapperScan;
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 应用启动入口
|
* 应用启动入口
|
||||||
* Created by macro on 2018/4/26.
|
* Created by macro on 2018/4/26.
|
||||||
*/
|
*/
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
@MapperScan({"com.macro.mall.mapper","com.macro.mall.dao"})
|
|
||||||
@EnableTransactionManagement
|
|
||||||
public class MallAdminApplication {
|
public class MallAdminApplication {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(MallAdminApplication.class, args);
|
SpringApplication.run(MallAdminApplication.class, args);
|
||||||
|
@ -0,0 +1,15 @@
|
|||||||
|
package com.macro.mall.config;
|
||||||
|
|
||||||
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MyBatis配置类
|
||||||
|
* Created by macro on 2019/4/8.
|
||||||
|
*/
|
||||||
|
@Configuration
|
||||||
|
@EnableTransactionManagement
|
||||||
|
@MapperScan({"com.macro.mall.mapper","com.macro.mall.dao"})
|
||||||
|
public class MyBatisConfig {
|
||||||
|
}
|
@ -1,14 +1,9 @@
|
|||||||
package com.macro.mall;
|
package com.macro.mall;
|
||||||
|
|
||||||
import org.mybatis.spring.annotation.MapperScan;
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.context.annotation.ComponentScan;
|
|
||||||
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
|
|
||||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
|
||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
@MapperScan("com.macro.mall.mapper")
|
|
||||||
public class MallDemoApplication{
|
public class MallDemoApplication{
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(MallDemoApplication.class, args);
|
SpringApplication.run(MallDemoApplication.class, args);
|
||||||
|
@ -0,0 +1,13 @@
|
|||||||
|
package com.macro.mall.demo.config;
|
||||||
|
|
||||||
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MyBatis配置类
|
||||||
|
* Created by macro on 2019/4/8.
|
||||||
|
*/
|
||||||
|
@Configuration
|
||||||
|
@MapperScan("com.macro.mall.mapper")
|
||||||
|
public class MyBatisConfig {
|
||||||
|
}
|
@ -1,13 +1,9 @@
|
|||||||
package com.macro.mall.portal;
|
package com.macro.mall.portal;
|
||||||
|
|
||||||
import org.mybatis.spring.annotation.MapperScan;
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
|
||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
@MapperScan({"com.macro.mall.mapper","com.macro.mall.portal.dao"})
|
|
||||||
@EnableScheduling
|
|
||||||
public class MallPortalApplication {
|
public class MallPortalApplication {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
@ -0,0 +1,15 @@
|
|||||||
|
package com.macro.mall.portal.config;
|
||||||
|
|
||||||
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MyBatis配置类
|
||||||
|
* Created by macro on 2019/4/8.
|
||||||
|
*/
|
||||||
|
@Configuration
|
||||||
|
@EnableTransactionManagement
|
||||||
|
@MapperScan({"com.macro.mall.mapper","com.macro.mall.portal.dao"})
|
||||||
|
public class MyBatisConfig {
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
package com.macro.mall.portal.config;
|
||||||
|
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定时任务配置
|
||||||
|
* Created by macro on 2019/4/8.
|
||||||
|
*/
|
||||||
|
@Configuration
|
||||||
|
@EnableScheduling
|
||||||
|
public class SpringTaskConfig {
|
||||||
|
}
|
@ -1,11 +1,9 @@
|
|||||||
package com.macro.mall.search;
|
package com.macro.mall.search;
|
||||||
|
|
||||||
import org.mybatis.spring.annotation.MapperScan;
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
@MapperScan({"com.macro.mall.mapper","com.macro.mall.search.dao"})
|
|
||||||
public class MallSearchApplication {
|
public class MallSearchApplication {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
@ -0,0 +1,13 @@
|
|||||||
|
package com.macro.mall.search.config;
|
||||||
|
|
||||||
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MyBatis配置类
|
||||||
|
* Created by macro on 2019/4/8.
|
||||||
|
*/
|
||||||
|
@Configuration
|
||||||
|
@MapperScan({"com.macro.mall.mapper","com.macro.mall.search.dao"})
|
||||||
|
public class MyBatisConfig {
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user