diff --git a/mybatis-flex-test/mybatis-flex-spring-boot-test/src/main/java/com/mybatisflex/test/entity/Test.java b/mybatis-flex-test/mybatis-flex-spring-boot-test/src/main/java/com/mybatisflex/test/entity/TestEntity.java similarity index 96% rename from mybatis-flex-test/mybatis-flex-spring-boot-test/src/main/java/com/mybatisflex/test/entity/Test.java rename to mybatis-flex-test/mybatis-flex-spring-boot-test/src/main/java/com/mybatisflex/test/entity/TestEntity.java index 966961c1..95f5a8ec 100644 --- a/mybatis-flex-test/mybatis-flex-spring-boot-test/src/main/java/com/mybatisflex/test/entity/Test.java +++ b/mybatis-flex-test/mybatis-flex-spring-boot-test/src/main/java/com/mybatisflex/test/entity/TestEntity.java @@ -23,5 +23,5 @@ import com.mybatisflex.annotation.Table; * @since 2023-06-16 */ @Table("test") -public class Test { +public class TestEntity { } \ No newline at end of file diff --git a/mybatis-flex-test/mybatis-flex-spring-boot-test/src/main/resources/mybatis-flex.properties b/mybatis-flex-test/mybatis-flex-spring-boot-test/src/main/resources/mybatis-flex.properties index a226f192..7263da34 100644 --- a/mybatis-flex-test/mybatis-flex-spring-boot-test/src/main/resources/mybatis-flex.properties +++ b/mybatis-flex-test/mybatis-flex-spring-boot-test/src/main/resources/mybatis-flex.properties @@ -1,3 +1,5 @@ -processor.mappersGenerateEnable = true +processor.mappersGenerateEnable=true +processor.entity.ignoreSuffixes=Entity +#processor.allInTables=true #processor.baseMapperClass=com.test.mapper.ExBaseMapper diff --git a/mybatis-flex-test/mybatis-flex-spring-test/src/main/java/com/mybatisflex/test/mapper/AccountMapper.java b/mybatis-flex-test/mybatis-flex-spring-test/src/main/java/com/mybatisflex/test/mapper/AccountMapper.java new file mode 100644 index 00000000..6764840e --- /dev/null +++ b/mybatis-flex-test/mybatis-flex-spring-test/src/main/java/com/mybatisflex/test/mapper/AccountMapper.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com). + *
+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *
+ * http://www.apache.org/licenses/LICENSE-2.0 + *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.mybatisflex.test.mapper;
+
+import com.mybatisflex.core.BaseMapper;
+import com.mybatisflex.test.model.Account;
+
+/**
+ * @author 王帅
+ * @since 2023-06-23
+ */
+public interface AccountMapper extends BaseMapper
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package com.mybatisflex.test;
import com.mybatisflex.core.query.QueryWrapper;
@@ -14,7 +30,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import java.util.List;
-import static com.mybatisflex.test.model.table.AccountTableDef.accountDef;
+import static com.mybatisflex.test.model.table.Tables.account_def;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = AppConfig.class)
@@ -33,7 +49,7 @@ public class AccountTest implements WithAssertions {
@Test
public void testSelectByQuery() {
QueryWrapper queryWrapper = QueryWrapper.create()
- .where(accountDef.age.eq(18));
+ .where(account_def.age.eq(18));
List