commit
f1535ef671
@ -0,0 +1,21 @@
|
||||
# Created by .ignore support plugin (hsz.mobi)
|
||||
### Example user template template
|
||||
### Example user template
|
||||
|
||||
# IntelliJ project files
|
||||
.idea
|
||||
*.iml
|
||||
out
|
||||
gen
|
||||
### Maven template
|
||||
target/
|
||||
pom.xml.tag
|
||||
pom.xml.releaseBackup
|
||||
pom.xml.versionsBackup
|
||||
pom.xml.next
|
||||
release.properties
|
||||
dependency-reduced-pom.xml
|
||||
buildNumber.properties
|
||||
.mvn/timing.properties
|
||||
.mvn/wrapper/maven-wrapper.jar
|
||||
|
@ -0,0 +1,13 @@
|
||||
spring:
|
||||
datasource:
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
url: jdbc:mysql:///air
|
||||
username: root
|
||||
password: root
|
||||
|
||||
|
||||
mybatis:
|
||||
mapper-locations: classpath:mapper/*.xml
|
||||
configuration:
|
||||
# district_id == districtId
|
||||
map-underscore-to-camel-case: true
|
@ -0,0 +1,25 @@
|
||||
package com.mashibing.mapper;
|
||||
|
||||
|
||||
import com.mashibing.entity.District;
|
||||
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;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
public class DistrictMapperTest {
|
||||
|
||||
@Autowired
|
||||
private DistrictMapper districtMapper;
|
||||
|
||||
@Test
|
||||
public void findAll() {
|
||||
List<District> list = districtMapper.findAll();
|
||||
System.out.println(list);
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package com.mashibing.service;
|
||||
|
||||
|
||||
import com.mashibing.entity.District;
|
||||
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;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
public class AirServiceTest {
|
||||
|
||||
@Autowired
|
||||
private AirService airService;
|
||||
|
||||
@Test
|
||||
public void findDistrictList() {
|
||||
List<District> list = airService.findDistrictList();
|
||||
System.out.println(list);
|
||||
}
|
||||
}
|
Loading…
Reference in new issue