@Import -> @ImportAutoConfiguration

master
mjkhan21 1 year ago
parent 86be114249
commit d8891c751f

@ -124,6 +124,18 @@
</includes> </includes>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins> </plugins>
</build> </build>

@ -1,7 +1,7 @@
package cokr.xit.foundation.boot; package cokr.xit.foundation.boot;
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Import;
import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.ContextConfiguration;
/**Spring Boot xit-foundation.jar /**Spring Boot xit-foundation.jar
@ -14,7 +14,7 @@ import org.springframework.test.context.ContextConfiguration;
*/ */
@SpringBootApplication @SpringBootApplication
@ContextConfiguration("classpath:spring/context-*.xml") @ContextConfiguration("classpath:spring/context-*.xml")
@Import({ @ImportAutoConfiguration({
CommonConfig.class, CommonConfig.class,
ServletConfig.class, ServletConfig.class,
MvcConfig.class, MvcConfig.class,

@ -3,9 +3,9 @@ package cokr.xit.foundation.boot;
import org.springframework.boot.CommandLineRunner; import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.WebApplicationType; import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration; import org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration;
import org.springframework.context.annotation.Import;
import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.ContextConfiguration;
/**Spring Boot xit-foundation.jar stand-alone /**Spring Boot xit-foundation.jar stand-alone
@ -19,7 +19,7 @@ import org.springframework.test.context.ContextConfiguration;
@SpringBootApplication(exclude = { @SpringBootApplication(exclude = {
WebMvcAutoConfiguration.class WebMvcAutoConfiguration.class
}) })
@Import({ @ImportAutoConfiguration({
CommonConfig.class, CommonConfig.class,
DatasourceConfig.class, DatasourceConfig.class,
TransactionConfig.class, TransactionConfig.class,

Loading…
Cancel
Save