springBoot ์คํ ์ DB ์ฐ๊ฒฐ์ ๊ธฐ๋ํ๋๋ฐ DB์ฐ๊ฒฐ์ด ํ์์๋ ๊ธฐ๋ฅ์ ๋ง๋ค ๋๋ ์ด์กฐ์ฐจ๋ ๊ท์ฐฎ๋ค.
๊ทธ๋ด ๋ ์๋์ฒ๋ผ ๋ฉ์ธ ๋ฉ์๋์ @SpringBootApplication์ exclude ์ต์ ์ ์ฃผ๋ฉด ๋๋ค.
package study.springaoptest1;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
public class SpringAopTest1Application {
public static void main(String[] args) {
SpringApplication.run(SpringAopTest1Application.class, args);
}
}
//์ด๋
ธํ
์ด์
์ต์
์ exclude๋ฅผ DataSource ํด๋์ค ์ถ๊ฐ
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
๊ฐ์ธ ์คํฐ๋ ๊ธฐ๋ก์ ๋ฉ๋ชจํ๋ ๊ณต๊ฐ์ด๋ผ ํ๋ฆฐ์ ์ด ์์ ์ ์์ต๋๋ค.
ํ๋ฆฐ ์ ์์ ๊ฒฝ์ฐ ๋๊ธ ๋ถํ๋๋ฆฝ๋๋ค.
'IT > development' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Java] linux jdk ํ๊ฒฝ๋ณ์ ์ธํ (54) | 2023.10.27 |
---|---|
[springBoot] Spring AOP simple source (60) | 2023.10.19 |
[Rest API]๊ณ์ธต๊ตฌ์กฐ Rest API sample(feat. springBoot) (64) | 2023.10.10 |
[JavaScript] ๊ฐ์ฒด ํด์ฒด ํ ๋น(Object Destructuring Assignment)(feat. ES6) (53) | 2023.10.04 |
[thymeleaf] ๋์ url ์์ฑ(feat. @{/url}) (59) | 2023.09.24 |
๋๊ธ