diff --git a/whatsmars-spring-boot/README.md b/whatsmars-spring-boot/README.md index 2a96f423a044d35b0718af205871ac61e6dca0da..c94722f3c48a14fe6830e659da428d8ab97d53e2 100644 --- a/whatsmars-spring-boot/README.md +++ b/whatsmars-spring-boot/README.md @@ -3,7 +3,7 @@ mvn clean package -DskipTests
得到的jar包中的MANIFEST.MF其中几行:
Main-Class: org.springframework.boot.loader.JarLauncher
-Start-Class: com.itlong.whatsmars.spring.boot.Application
+Start-Class: com.itlong.whatsmars.spring.boot.App
Spring-Boot-Classes: BOOT-INF/classes/
Spring-Boot-Lib: BOOT-INF/lib/
diff --git a/whatsmars-spring-boot/pom.xml b/whatsmars-spring-boot/pom.xml index 0bd60327635153fd01f0cf2597852cb9f673107a..15bd88400c8a8c08de4914a3409a359b3309d19f 100644 --- a/whatsmars-spring-boot/pom.xml +++ b/whatsmars-spring-boot/pom.xml @@ -12,7 +12,7 @@ - com.itlong.whatsmars.spring.boot.Application + com.itlong.whatsmars.spring.boot.App diff --git a/whatsmars-spring-boot/src/main/java/com/itlong/whatsmars/spring/boot/Application.java b/whatsmars-spring-boot/src/main/java/com/itlong/whatsmars/spring/boot/App.java similarity index 80% rename from whatsmars-spring-boot/src/main/java/com/itlong/whatsmars/spring/boot/Application.java rename to whatsmars-spring-boot/src/main/java/com/itlong/whatsmars/spring/boot/App.java index 65888906a8a1bffeff83ac0b6ba2981d7a863456..fa1faf2ad63fad7074e797d244166cbb057eb30d 100644 --- a/whatsmars-spring-boot/src/main/java/com/itlong/whatsmars/spring/boot/Application.java +++ b/whatsmars-spring-boot/src/main/java/com/itlong/whatsmars/spring/boot/App.java @@ -4,17 +4,16 @@ import com.itlong.whatsmars.spring.boot.config.UserConfig; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.boot.context.properties.EnableConfigurationProperties; @SpringBootApplication // 加上exclude=DataSource..后,不会连接数据库,同时@Mapper也不会起作用 @EnableAutoConfiguration//(exclude={DataSourceAutoConfiguration.class}) @EnableConfigurationProperties({UserConfig.class}) -public class Application { +public class App { public static void main(String[] args) { - SpringApplication.run(Application.class, args); + SpringApplication.run(App.class, args); } } \ No newline at end of file diff --git a/whatsmars-spring-boot/src/main/java/com/itlong/whatsmars/spring/boot/config/BeanConfig.java b/whatsmars-spring-boot/src/main/java/com/itlong/whatsmars/spring/boot/config/BeanConfig.java index 0e8b2de5ceda4de98cb44bac77be4814099e18d7..25411414168eb45593a27eb100c205f0553c52bc 100644 --- a/whatsmars-spring-boot/src/main/java/com/itlong/whatsmars/spring/boot/config/BeanConfig.java +++ b/whatsmars-spring-boot/src/main/java/com/itlong/whatsmars/spring/boot/config/BeanConfig.java @@ -7,6 +7,6 @@ import org.springframework.context.annotation.ImportResource; * Created by shenhongxi on 2017/6/21. */ @Configuration -@ImportResource(locations={"classpath:application-bean.xml"}) +@ImportResource(locations={"classpath:dubbo-demo-consumer.xml"}) public class BeanConfig { } diff --git a/whatsmars-spring-boot/src/main/resources/dubbo-demo-consumer.xml b/whatsmars-spring-boot/src/main/resources/dubbo-demo-consumer.xml new file mode 100644 index 0000000000000000000000000000000000000000..d4ced4f44cc323a4d6b466d154a74d1dbee3c720 --- /dev/null +++ b/whatsmars-spring-boot/src/main/resources/dubbo-demo-consumer.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + \ No newline at end of file