service ๋จ์ ๋ฐ์ดํฐ๊ฐ ์ ์ ๋ฌ๋๋์ง ํ์ธ ํ๊ธฐ ์ํด ๋ธ๋ ์ดํฌํฌ์ธํธ ๋ฃ์ด์ ํ์ธํ๊ธฐ.
๋จ์ํ ์คํธ์ ์์
*ํ ์คํธ๋ฅผ ํ๋ ์ต๊ด์ ์ ๋ง ์ค์ํ๋๊น ํญ์ ๋ชธ์ ์ต์ํ๊ฒ ๋ง๋ค์!
๋ด๊ฐ ํ ์คํธํ๊ณ ์ ํ๋ ๊ฒ์ ์๋๋ฆฌ์ค๋ฅผ ๋จผ์ ๋ง๋ค์ด์ผํจ.
1. ํ ์คํธ ๋๋ ํ ๋ฆฌ ๋ง๋ค๊ธฐ [src - test - java - edu -axboot - domain - {company - [CompanyServiceTest.java]}
2. class ์ค๊ณ
*Junit assert ๊ธฐ๋ฅ ์์๋ณด๊ธฐ
3. Test ๊ตฌ์ฑ
Test ์คํ: ํ ์์ค์ฝ๋์์ ๋ง์ฐ์ค ์ค๋ฅธ์ชฝ ํด๋ฆญ run์ผ๋ก ์คํ
๋๋ฒ๊ทธ ์คํ: ํ ์์ค์ฝ๋์์ ๋ง์ฐ์ค ์ค๋ฅธ์ชฝ ํด๋ฆญ ๋๋ฒ๊ทธ run์ผ๋ก ์คํ
package edu.axboot.domain.company;
import com.chequer.axboot.core.parameter.RequestParams;
import edu.axboot.AXBootApplication;
import lombok.extern.java.Log;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import java.util.List;
import static org.junit.Assert.assertTrue;
//ํ
์คํธํ๋ ค๊ณ ํ๋ ๋ฉ์๋์์ ๋จ์ํ
์คํธ๋ฅผ ํ ์ ์๋ ์ด๋
ธํ
์ด์
์ ์ค๋ค.
@Log
@RunWith(SpringRunner.class)
@SpringBootTest(classes = AXBootApplication.class)
public class CompanyServiceTest {
@Autowired
private CompanyService companyService;
@Test
//companyservie.java์์ getByQueryDsl์ ํจ์๋ฅผ ํ
์คํธํ ๊ฒฝ์ฐ.
//Test์ ํด๋น ๋ฉ์๋๋ช
์ ๋ช
์ํด์ค
public void testGetQueryDls() {
// ํ
์คํธ๋จ๊ณ์์๋ "๋๋ฒ๊น
" ๊ฐ๋ฅ
// ***given : ์ฌ์ ์ค๋น, ํ
์คํธํ๊ธฐ์ํ ๋ณ์,์ ์
RequestParams<Company> requestParams = new RequestParams<Company>(); //ํด๋น ๋ฉ์๋ ํ๋ผ๋ฏธํฐ๊ฐ
requestParams.put("company", "ํ ์ค"); //ํ๋ผ๋ฏธํฐ ๊ฐ ๋ฃ์ด์ฃผ๊ธฐ
requestParams.put("ceo", "");
requestParams.put("bizno", "");
// ------------๊ฐ์ ๋์ง------
// ***when : ์ค์ Action
List<Company> result = this.companyService.getByQueryDsl(requestParams);
//------ํ๋ผ๋ฏธํฐ๊ฐ ๋๊ฒจ์ฃผ๊ธฐ
// ***then : ๊ฒฐ๊ณผ์ ์ฐธ๊ฐ์ ์ฑ๊ณต์ฌ๋ถ. ( true/false )
// asserTrue : ๊ฒฐ๊ณผ๊ฐ ์ฌ๋ถ์ ์ฐธ๊ฑฐ์ง์ ๋ฐํํ๋ ๊ธฐ๋ฅ.
// assertTrue(result.size() > 0);
// ์ฐธ์ ์กฐ๊ฑด์ ์ ํํ๊ฒ 1๊ฑด์ธ์ง ๋ช
์
assertTrue(result.size() == 1);
}
}
1)
2)
3)
๋ฆฌํฉํ ๋ง
Test๋ก ํ ์ด๋ธ ๋ฐ์ดํฐ CRUD
Insert
@Test
public void testSaveQueryDls_create() {
/* given
1.Company๊ฐ์ฒด ๊ฐ ํํ์ Array๋ฐฐ์ด์ ๊ฐ์ฒด๋ฅผ ์ ์ธ,*/
List<Company> requests = new ArrayList<Company>(); // ๊ทธ๋ฆ
// 2.๊ฐ์ฒด๋ฅผ ์์ฑํด์ ๊ฐ์ addํด์ผํ๋ค. ๋ฐ์ดํฐ๋ฅผ ๋ด์ ์ฌ๋ฃ(๋ด์ฉ)๋ค..
Company company = new Company();
company.setCompanyNm("๋จํ
ํ์ฌ");
company.setCeo("๋จํ
๋ํ");
company.setBizno("1234");
company.set__created__(true); //์์ฑํ๊ธฐ ์ํด true๊ฐ์ ๋ฃ์ด์ค
//company๊ฐ์ฒด๊ฐ SimpleJpaModel๋ฅผ ์์๋ฐ์์
//SimpleJpaModel์ AxBootCrudModel ์ CRUD๊ธฐ๋ฅ์ด ์์.
requests.add(company); // ๋ด์ฉ์ ๋ด์ ํ๋ผ๋ฏธํฐ ๊ฐ์ ๋ณด๋
/*when
* ๊ฒฐ๊ณผ๊ฐ์ ๋ฐ๋ result*/
int result = this.companyService.saveByQueryDsl(requests);
// then
// ๊ฒฐ๊ณผ๊ฐ 1์ด๋์ค๋ฉด ํ
์คํธ ์ฑ๊ณต
assertTrue(result == 1);
}
์ ๋ณด๋ฅผ ๋ณต์๋ก ๋ฃ์ด์ค ๋ ์ธ์คํด์ค๋ ๋ณ๋๋ก ์์ฑํด์ค์ผ ๋ฐ์ดํฐ ์ ๋ณด ๊ฒน์นจ ํ์์ด ์๋จ
Update
Delete
-๋ชฉ์ /๋จ์ํ ์คํธ ํตํฉํ์ธ ํ๊ธฐ ์ํด ๋ธ๋ ์ดํฌํฌ์ธํธ ๋ฃ์ด์ ํ์ธํ๊ธฐ.
๋จ์ํ ์คํธ์ ์์
*ํ ์คํธ๋ฅผ ํ๋ ์ต๊ด์ ์ ๋ง ์ค์ํ๋๊น ํญ์ ๋ชธ์ ์ต์ํ๊ฒ ๋ง๋ค์!
๋ด๊ฐ ํ ์คํธํ๊ณ ์ ํ๋ ๊ฒ์ ์๋๋ฆฌ์ค๋ฅผ ๋จผ์ ๋ง๋ค์ด์ผํจ.
1. ํ ์คํธ ๋๋ ํ ๋ฆฌ ๋ง๋ค๊ธฐ [src - test - java - edu -axboot - domain - {company - [CompanyServiceTest.java]}
๏ฟผ
2. class ์ค๊ณ
๏ฟผ
*Junit assert ๊ธฐ๋ฅ ์์๋ณด๊ธฐ
3. Test ๊ตฌ์ฑ
Test ์คํ: ํ ์์ค์ฝ๋์์ ๋ง์ฐ์ค ์ค๋ฅธ์ชฝ ํด๋ฆญ run์ผ๋ก ์คํ
๋๋ฒ๊ทธ ์คํ: ํ ์์ค์ฝ๋์์ ๋ง์ฐ์ค ์ค๋ฅธ์ชฝ ํด๋ฆญ ๋๋ฒ๊ทธ run์ผ๋ก ์คํ
package edu.axboot.domain.company;
import com.chequer.axboot.core.parameter.RequestParams;
import edu.axboot.AXBootApplication;
import lombok.extern.java.Log;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import java.util.List;
import static org.junit.Assert.assertTrue;
//ํ ์คํธํ๋ ค๊ณ ํ๋ ๋ฉ์๋์์ ๋จ์ํ ์คํธ๋ฅผ ํ ์ ์๋ ์ด๋ ธํ ์ด์ ์ ์ค๋ค.
@Log
@RunWith(SpringRunner.class)
@SpringBootTest(classes = AXBootApplication.class)
public class CompanyServiceTest {
@Autowired
private CompanyService companyService;
@Test
//companyservie.java์์ getByQueryDsl์ ํจ์๋ฅผ ํ ์คํธํ ๊ฒฝ์ฐ.
//Test์ ํด๋น ๋ฉ์๋๋ช ์ ๋ช ์ํด์ค
public void testGetQueryDls() {
// ํ ์คํธ๋จ๊ณ์์๋ "๋๋ฒ๊น " ๊ฐ๋ฅ
// ***given : ์ฌ์ ์ค๋น, ํ ์คํธํ๊ธฐ์ํ ๋ณ์,์ ์
RequestParams<Company> requestParams = new RequestParams<Company>(); //ํด๋น ๋ฉ์๋ ํ๋ผ๋ฏธํฐ๊ฐ
requestParams.put("company", "ํ ์ค"); //ํ๋ผ๋ฏธํฐ ๊ฐ ๋ฃ์ด์ฃผ๊ธฐ
requestParams.put("ceo", "");
requestParams.put("bizno", "");
// ------------๊ฐ์ ๋์ง------
// ***when : ์ค์ Action
List<Company> result = this.companyService.getByQueryDsl(requestParams);
//------ํ๋ผ๋ฏธํฐ๊ฐ ๋๊ฒจ์ฃผ๊ธฐ
// ***then : ๊ฒฐ๊ณผ์ ์ฐธ๊ฐ์ ์ฑ๊ณต์ฌ๋ถ. ( true/false )
// asserTrue : ๊ฒฐ๊ณผ๊ฐ ์ฌ๋ถ์ ์ฐธ๊ฑฐ์ง์ ๋ฐํํ๋ ๊ธฐ๋ฅ.
// assertTrue(result.size() > 0);
// ์ฐธ์ ์กฐ๊ฑด์ ์ ํํ๊ฒ 1๊ฑด์ธ์ง ๋ช ์
assertTrue(result.size() == 1);
}
}
1)
๏ฟผ
CompanyService.java
2)
๏ฟผ
CompanyServiceTest.java
3)
๏ฟผ
CompanyService.java
๋ฆฌํฉํ ๋ง
๏ฟผ
Test๋ก ํ ์ด๋ธ ๋ฐ์ดํฐ CRUD
Insert
@Test
public void testSaveQueryDls_create() {
/* given
1.Company๊ฐ์ฒด ๊ฐ ํํ์ Array๋ฐฐ์ด์ ๊ฐ์ฒด๋ฅผ ์ ์ธ,*/
List<Company> requests = new ArrayList<Company>(); // ๊ทธ๋ฆ
// 2.๊ฐ์ฒด๋ฅผ ์์ฑํด์ ๊ฐ์ addํด์ผํ๋ค. ๋ฐ์ดํฐ๋ฅผ ๋ด์ ์ฌ๋ฃ(๋ด์ฉ)๋ค..
Company company = new Company();
company.setCompanyNm("๋จํ ํ์ฌ");
company.setCeo("๋จํ ๋ํ");
company.setBizno("1234");
company.set__created__(true); //์์ฑํ๊ธฐ ์ํด true๊ฐ์ ๋ฃ์ด์ค
//company๊ฐ์ฒด๊ฐ SimpleJpaModel๋ฅผ ์์๋ฐ์์
//SimpleJpaModel์ AxBootCrudModel ์ CRUD๊ธฐ๋ฅ์ด ์์.
requests.add(company); // ๋ด์ฉ์ ๋ด์ ํ๋ผ๋ฏธํฐ ๊ฐ์ ๋ณด๋
/*when
* ๊ฒฐ๊ณผ๊ฐ์ ๋ฐ๋ result*/
int result = this.companyService.saveByQueryDsl(requests);
// then
// ๊ฒฐ๊ณผ๊ฐ 1์ด๋์ค๋ฉด ํ ์คํธ ์ฑ๊ณต
assertTrue(result == 1);
}
๏ฟผ
์ ๋ณด๋ฅผ ๋ณต์๋ก ๋ฃ์ด์ค ๋ ์ธ์คํด์ค๋ ๋ณ๋๋ก ์์ฑํด์ค์ผ ๋ฐ์ดํฐ ์ ๋ณด ๊ฒน์นจ ํ์์ด ์๋จ
๏ฟผ
๋ ํ ์ด๋ธ ์ถ๊ฐ์
Update
๏ฟผ
Delete
๏ฟผ
-๋ชฉ์ /๋จ์ํ ์คํธ ํตํฉ: ํ์์ ๋ฐ์ดํฐ๋ฅผ ๋๊ณ ์ง์ db์ ๋ฐ์ํ์ง ์๊ณ ํ ์คํธ๋ฅผ ํ๋ ๊ฒ. ์์ฑ-์์ -์ญ์ ๊น์ง ์๋ฃํ๊ณ ํ ์คํธ๋ฅผ ๋ง์นจ
-ํ ์คํธ๋ ์ํํ๋, ํ์ ์ ๋จ๊ธฐ์ง ์๊ธฐ ์ํด์ ์ผ๊ด์ ์ผ๋ก CRUD๋ฅผ ์คํํ์ฌ ํ ์คํธ ์ฑ๊ณต์ฌ๋ถ๋ก ์๋ฌ ํ๋จ์ํจ.
package edu.axboot.domain.company;
import com.chequer.axboot.core.parameter.RequestParams;
import edu.axboot.AXBootApplication;
import lombok.extern.java.Log;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.MethodSorters;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import java.util.ArrayList;
import java.util.List;
import static org.junit.Assert.assertTrue;
//ํ
์คํธํ๋ ค๊ณ ํ๋ ๋ฉ์๋์์ ๋จ์ํ
์คํธ๋ฅผ ํ ์ ์๋ ์ด๋
ธํ
์ด์
์ ์ค๋ค.
@Log
@RunWith(SpringRunner.class)
@SpringBootTest(classes = AXBootApplication.class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING) //์ด๋ฆ์์ผ๋ก ์ ๋ ฌ
public class CompanyServiceTest {
@Autowired
private CompanyService companyService;
public static long testId = 0; // ์ ์ญ๋ณ์๋ก ์ ์ํด์ ๊ฒฐ๊ณผ๊ฐ์ ๊ณต์
//๊ทธ๋ฅ longํ์
์ด๋ฉด ํจ์๊ฐ ๋ฐ๋๋๋ง๋ค ๊ฐ์ด 0์ผ๋ก ์ด๊ธฐํ ๋๋ฏ๋ก static์ผ๋ก ์ ์ํจ.
@Test
//companyservie.java์์ getByQueryDsl์ ํจ์๋ฅผ ํ
์คํธํ ๊ฒฝ์ฐ.
//Test์ ํด๋น ๋ฉ์๋๋ช
์ ๋ช
์ํด์ค
public void testGetQueryDls() {
// ํ
์คํธ๋จ๊ณ์์๋ "๋๋ฒ๊น
" ๊ฐ๋ฅ
// ***given : ์ฌ์ ์ค๋น, ํ
์คํธํ๊ธฐ์ํ ๋ณ์,์ ์
RequestParams<Company> requestParams = new RequestParams<Company>(); //ํด๋น ๋ฉ์๋ ํ๋ผ๋ฏธํฐ๊ฐ
requestParams.put("company", "ํ ์ค"); //ํ๋ผ๋ฏธํฐ ๊ฐ ๋ฃ์ด์ฃผ๊ธฐ
requestParams.put("ceo", "");
requestParams.put("bizno", "");
// ------------๊ฐ์ ๋์ง------
// ***when : ์ค์ Action
List<Company> result = this.companyService.getByQueryDsl(requestParams);
//------ํ๋ผ๋ฏธํฐ๊ฐ ๋๊ฒจ์ฃผ๊ธฐ
// ***then : ๊ฒฐ๊ณผ์ ์ฐธ๊ฐ์ ์ฑ๊ณต์ฌ๋ถ. ( true/false )
// asserTrue : ๊ฒฐ๊ณผ๊ฐ ์ฌ๋ถ์ ์ฐธ๊ฑฐ์ง์ ๋ฐํํ๋ ๊ธฐ๋ฅ.
// assertTrue(result.size() > 0);
// ์ฐธ์ ์กฐ๊ฑด์ ์ ํํ๊ฒ 1๊ฑด์ธ์ง ๋ช
์
assertTrue(result.size() == 1);
}
@Test
public void testGetQueryDlsByString() { //๋ ์ด๋ธ๋ก ์กฐํ
// ***given : ์ฌ์ ์ค๋น, ํ
์คํธํ๊ธฐ์ํ ๋ณ์,์ ์
String companyNm = "ํ ์ค";
String ceo = "";
String bizno = "";
// ***when : ์ค์ Action
List<Company> result = this.companyService.getByQueryDsl(companyNm, ceo, bizno);
// ์๋ก์ด ๋ฉ์๋๋ช
, ๊ฐ์ ๋ฉ์๋๋ช
์ผ๋ก๋ ๊ฐ๋ฅ
// ***then : ๊ฒฐ๊ณผ์ ์ฐธ๊ฐ์ ์ฑ๊ณต์ฌ๋ถ. ( true/false )
assertTrue(result.size() == 1);
}
// ํ
์ด๋ธ ์์ฑ
@Test
public void test1_SaveQueryDls_create() {
/* given
1.Company๊ฐ์ฒด ๊ฐ ํํ์ Array๋ฐฐ์ด์ ๊ฐ์ฒด๋ฅผ ์ ์ธ,*/
List<Company> requests = new ArrayList<Company>(); // ๊ทธ๋ฆ
// 2.๊ฐ์ฒด๋ฅผ ์์ฑํด์ ๊ฐ์ addํด์ผํ๋ค. ๋ฐ์ดํฐ๋ฅผ ๋ด์ ์ฌ๋ฃ(๋ด์ฉ)๋ค..
Company company = new Company();
company.setCompanyNm("๋จํ
ํ์ฌ");
company.setCeo("๋จํ
๋ํ");
company.setBizno("1234");
company.set__created__(true); //์์ฑํ๊ธฐ ์ํด true๊ฐ์ ๋ฃ์ด์ค
//company๊ฐ์ฒด๊ฐ SimpleJpaModel๋ฅผ ์์๋ฐ์์
//SimpleJpaModel์ AxBootCrudModel ์ CRUD๊ธฐ๋ฅ์ด ์์.
requests.add(company); // ๋ด์ฉ์ ๋ด์ ํ๋ผ๋ฏธํฐ ๊ฐ์ ๋ณด๋
/*
when
๊ฒฐ๊ณผ๊ฐ์ ๋ฐ๋ result
*/
testId = this.companyService.saveByQueryDsl(requests);
// then
// ๊ฒฐ๊ณผ๊ฐ 1์ด๋์ค๋ฉด ํ
์คํธ ์ฑ๊ณต
assertTrue(testId > 0);
}
// modified
@Test
public void test2_SaveQueryDls_update() {
//given
List<Company> requests = new ArrayList<Company>(); // ๊ทธ๋ฆ
Company company = new Company();
company.setId(testId); //๊ฐ์ ์บ์คํ
& ๋ค์ L๋ถ์ด๋ 2๊ฐ์ง ๋ฐฉ๋ฒ์ด ์์
company.setCompanyNm("๋จํ
ํ์ฌ2");
company.setCeo("๋จํ
๋ํ");
company.setBizno("1234");
company.set__modified__(true);
requests.add(company);
/*when
* ๊ฒฐ๊ณผ๊ฐ์ ๋ฐ๋ result*/
long result = this.companyService.saveByQueryDsl(requests);
// then
// ๊ฒฐ๊ณผ๊ฐ 1์ด๋์ค๋ฉด ํ
์คํธ ์ฑ๊ณต
assertTrue(result == 1);
}
//Delete
@Test
public void test3_SaveQueryDls_delete() {
//given
List<Company> requests = new ArrayList<Company>();
Company company = new Company();
company.setId(testId);
company.set__deleted__(true);
requests.add(company);
/*when
* ๊ฒฐ๊ณผ๊ฐ์ ๋ฐ๋ result*/
long result = this.companyService.saveByQueryDsl(requests);
// then
// ๊ฒฐ๊ณผ๊ฐ 1์ด๋์ค๋ฉด ํ
์คํธ ์ฑ๊ณต
assertTrue(result == 1);
}
}
@FixMethodOrder(MethodSorters.NAME_ASCENDING) //์ด๋ฆ์์ผ๋ก ์ ๋ ฌ๊ธฐ๋ฅ์ ์ถ๊ฐ
SelectOne์ ํจ์๋ฅผ ๋ง๋ค์ด ํ ์คํธํ๊ณ ์ ํ๋ ์ ๋ณด์ ์ค์ db์ ์ ์ฅ๋ ์ ๋ณด๊ฐ ๊ฐ์์ง ํ์ธ
@Test
public void test4_GetQueryDls_seletOne() { //๋ ์ด๋ธ๋ก ํ๊ฑด ์กฐํ
// ***given : ์ฌ์ ์ค๋น, ํ
์คํธํ๊ธฐ์ํ ๋ณ์,์ ์
String companyNm = "๋จํ
ํ์ฌ2";
String ceo = "";
String bizno = "";
// ***when : ์ค์ Action
Company result = this.companyService.getOneByQueryDsl(testId);
// ***then : ๊ฒฐ๊ณผ์ ์ฐธ๊ฐ์ ์ฑ๊ณต์ฌ๋ถ. ( true/false )
assertTrue(result.getCompanyNm().equals(companyNm));
}
public Company getOneByQueryDsl(long id) {
BooleanBuilder builder = new BooleanBuilder(); // BooleanBuilder : where๋ค์ ์กฐ๊ฑด์ ์์ฑํด์ค
builder.and(qCompany.id.eq(id));
Company company = select()
.from(qCompany)
.where(builder)
.fetchOne();
return company;
}
๋๋ ํ ๋ฆฌ ํ์
src - ์ค์ ๊ด๋ฆฌํ๋ ํ์ผ
์ปดํ์ผ ํ ์ ์ฅ๋๋ ์ ๋ณด(ํด๋์ค์์ฑ๋ฑ) -target
webapp - ํ๋ฉด๋จ
java - ์๋ฐ์ฝ๋
ํ๊ฒฝํ์ผ resource ํด๋ - ํ๊ฒฝ์ค์ ํ์ผ๋ค์ด ์์
axboot-common-properties : ๊ณตํต์ ์ผ๋ก ์ค์ ๋์ผ๋๋ ์์๋ค
axboot-local-production ํ์ผ:๊ฐ๋ฐํ๊ฒฝ์์ ์ด๋ค์ง๋
axboot-production-properties: common-properties ์ ๋น์ทํ ๊ตฌ์ฑ
์ด์๊ณ์ ๋๋ฆฌ๋ ํ๊ฒฝ /์ด์๊ณํ๊ฒฝ์ด ๋ค๋ฅผ๋ ์ด๊ณณ์ ํ์ผ์ ๋ง๋ค์ด์ ํ์ฉ
์์ฑ์ axboot.dataSource.url์ด ์๋ก ๋ค๋ฆ.
๋ก์ปฌ/ํ๋ก๋์ ํ๊ฒฝ ๊ตฌ๋ถ: src-main-java-ํ๋ก์ ํธํด๋(edu) ํด๋์์ AxbootApplication.java์
[@PropertySource(value = {"classpath:axboot-common.properties", "classpath:axboot-${spring.profiles.active:local}.properties"})]์์ ํ์ธ๊ฐ๋ฅ.
[local, production] 2๊ฐ์ง ํ์ ์ผ๋ก JDBCURL (/setup :URL)์ DBํ๊ฒฝ์ ๋ณ๊ฒฝํ ์ ์์
DBํ๊ฒฝ์ด ๋ฐ๋๋ฉด loca.properties์ ์ค์ ์ ์ ์ฉํ๋ฉด๋จ (mysql, oracle๊ณ์ ๋ฑ..)
๋ค๊ตญ์ด ์ง์- ๋ฆฌ์์ค์ ๋ค๋ฅธ ์ธ์ด์ properties๋ฅผ ์ถ๊ฐํ๋ฉด ๋จ.
resource-template : ํ๋ก๊ทธ๋จ ํ๋ฉด๋จ ํ ํ๋ฆฟ jsp์์ค ๋ถ๋ฌ์์ ๊ตฌ์ฑํ ์ ์์.
AXBootSecurityConfig.java
role๊ถํ ์ค์ ์ ํ ์ ์์.
spring seculity์์ ์๋์ ์ผ๋ก ์ค์ ์ ์ง์ํด์ค์ ์๋ง๊ฒ ์ค์ ํ๋ฉด๋๋ค.
AxBootWebConfigureAdapter ํ๋ฉด๋จ
๋ฐ์ดํฐ๋ฒ ์ด์ค์ ๋ํ ํธ๋์ญ์ ,์์ค ๊ด๋ฆฌ
'Programming๐ฉ๐ปโ๐ป > AxBoot' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
Banner / Logging / Excel download (0) | 2021.04.30 |
---|---|
jsfiddle (0) | 2021.04.23 |
Mybatis์ฐ๋ (0) | 2021.04.19 |
QueryDSL (0) | 2021.04.19 |
Mac ๋งฅ) Maven ์ค์น ๋ฐ ํ๊ฒฝ ๋ณ์ ์ค์ (0) | 2021.04.19 |