Skip to content

Commit

Permalink
adjust
Browse files Browse the repository at this point in the history
  • Loading branch information
awesome-wind committed Dec 4, 2017
1 parent 7f0753b commit c48da42
Show file tree
Hide file tree
Showing 4 changed files with 125 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
@Mapper
public interface UserMapper{
// mybatis中数据库不能自动识别大写字母,如userName,它只认识user_name,因此需要转换

@Select("SELECT * FROM user")
@Results({
@Result(column = "user_name",property = "userName")
Expand All @@ -32,5 +31,4 @@ public interface UserMapper{

@Delete("DELETE FROM user WHERE id=#{id}")
void delOne(int id);

}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
mybatis.type-aliases-package=com.springboot.mybatis.entity
mybatis.type-aliases-package=com.springboot.mybatis.entity

spring.datasource.url=jdbc:mysql://localhost:3306/bootDemo?useUnicode=true&characterEncoding=utf-8&serverTimezone=UTC&useSSL=true
spring.datasource.username=root
Expand Down
141 changes: 115 additions & 26 deletions mybatisXML/.idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions mybatisXML/mybatisxml.iml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@
<facet type="Spring" name="Spring">
<configuration />
</facet>
<facet type="web" name="Web">
<configuration>
<webroots />
<sourceRoots>
<root url="file://$MODULE_DIR$/src/main/java" />
<root url="file://$MODULE_DIR$/src/main/resources" />
</sourceRoots>
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
Expand Down

0 comments on commit c48da42

Please sign in to comment.