diff --git a/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/main/java/sample/mybatis/SampleAnnotationApplication.java b/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/main/java/sample/mybatis/annotation/SampleAnnotationApplication.java similarity index 93% rename from mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/main/java/sample/mybatis/SampleAnnotationApplication.java rename to mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/main/java/sample/mybatis/annotation/SampleAnnotationApplication.java index b72a8bfc..580f7827 100644 --- a/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/main/java/sample/mybatis/SampleAnnotationApplication.java +++ b/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/main/java/sample/mybatis/annotation/SampleAnnotationApplication.java @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package sample.mybatis; +package sample.mybatis.annotation; import org.springframework.boot.CommandLineRunner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; -import sample.mybatis.mapper.CityMapper; +import sample.mybatis.annotation.mapper.CityMapper; @SpringBootApplication public class SampleAnnotationApplication implements CommandLineRunner { diff --git a/mybatis-spring-boot-samples/mybatis-spring-boot-sample-xml/src/main/java/sample/mybatis/domain/City.java b/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/main/java/sample/mybatis/annotation/domain/City.java similarity index 97% rename from mybatis-spring-boot-samples/mybatis-spring-boot-sample-xml/src/main/java/sample/mybatis/domain/City.java rename to mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/main/java/sample/mybatis/annotation/domain/City.java index 1e81e0af..5bf0896e 100644 --- a/mybatis-spring-boot-samples/mybatis-spring-boot-sample-xml/src/main/java/sample/mybatis/domain/City.java +++ b/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/main/java/sample/mybatis/annotation/domain/City.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package sample.mybatis.domain; +package sample.mybatis.annotation.domain; import java.io.Serializable; diff --git a/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/main/java/sample/mybatis/annotation/mapper/CityMapper.java b/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/main/java/sample/mybatis/annotation/mapper/CityMapper.java new file mode 100644 index 00000000..8df45bd5 --- /dev/null +++ b/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/main/java/sample/mybatis/annotation/mapper/CityMapper.java @@ -0,0 +1,33 @@ +/* + * Copyright 2015-2021 the original author or authors. + * + * 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 sample.mybatis.annotation.mapper; + +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import sample.mybatis.annotation.domain.City; + +/** + * @author Eddú Meléndez + */ +@Mapper +public interface CityMapper { + + @Select("select id, name, state, country from city where state = #{state}") + City findByState(@Param("state") String state); + +} diff --git a/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/main/resources/application.properties b/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/main/resources/application.properties index daccdb67..e355af59 100644 --- a/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/main/resources/application.properties +++ b/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/main/resources/application.properties @@ -1,5 +1,5 @@ # -# Copyright 2015-2019 the original author or authors. +# Copyright 2015-2021 the original author or authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,4 +15,4 @@ # logging.level.root=WARN -logging.level.sample.mybatis.mapper=TRACE \ No newline at end of file +logging.level.sample.mybatis.annotation.mapper=TRACE \ No newline at end of file diff --git a/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/extensions/annotation/CaptureSystemOutput.java b/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/extensions/annotation/CaptureSystemOutput.java new file mode 100644 index 00000000..4d42a4b5 --- /dev/null +++ b/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/extensions/annotation/CaptureSystemOutput.java @@ -0,0 +1,263 @@ +/* + * Copyright 2015-2021 the original author or authors. + * + * 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 extensions.annotation; + +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.allOf; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.OutputStream; +import java.io.PrintStream; +import java.lang.annotation.Retention; +import java.lang.annotation.Target; +import java.util.ArrayList; +import java.util.List; + +import org.hamcrest.Matcher; +import org.junit.jupiter.api.extension.AfterAllCallback; +import org.junit.jupiter.api.extension.AfterEachCallback; +import org.junit.jupiter.api.extension.BeforeAllCallback; +import org.junit.jupiter.api.extension.ExtendWith; +import org.junit.jupiter.api.extension.ExtensionContext; +import org.junit.jupiter.api.extension.ExtensionContext.Namespace; +import org.junit.jupiter.api.extension.ExtensionContext.Store; +import org.junit.jupiter.api.extension.ParameterContext; +import org.junit.jupiter.api.extension.ParameterResolver; +import org.junit.platform.commons.support.ReflectionSupport; + +/** + * {@code @CaptureSystemOutput} is a JUnit JUpiter extension for capturing output to {@code System.out} and + * {@code System.err} with expectations supported via Hamcrest matchers. + * + *

Example Usage

+ * + *
+ * {@literal @}Test
+ * {@literal @}CaptureSystemOutput
+ * void systemOut(OutputCapture outputCapture) {
+ *     outputCapture.expect(containsString("System.out!"));
+ *
+ *     System.out.println("Printed to System.out!");
+ * }
+ *
+ * {@literal @}Test
+ * {@literal @}CaptureSystemOutput
+ * void systemErr(OutputCapture outputCapture) {
+ *     outputCapture.expect(containsString("System.err!"));
+ *
+ *     System.err.println("Printed to System.err!");
+ * }
+ * 
+ * + *

+ * Based on code from Spring Boot's OutputCapture + * rule for JUnit 4 by Phillip Webb and Andy Wilkinson. + * + *

+ * Borrowing source from Sam Brannen as listed online at spring and stackoverflow from here CaptureSystemOutput + * + *

+ * Additional changes to Sam Brannen logic supplied by kazuki43zoo from here enhancement + * capture + * + * @author Sam Brannen + * @author Phillip Webb + * @author Andy Wilkinson + */ +@Target({ TYPE, METHOD }) +@Retention(RUNTIME) +@ExtendWith(CaptureSystemOutput.Extension.class) +public @interface CaptureSystemOutput { + + class Extension implements BeforeAllCallback, AfterAllCallback, AfterEachCallback, ParameterResolver { + + @Override + public void beforeAll(ExtensionContext context) { + getOutputCapture(context).captureOutput(); + } + + public void afterAll(ExtensionContext context) { + getOutputCapture(context).releaseOutput(); + } + + @Override + public void afterEach(ExtensionContext context) { + OutputCapture outputCapture = getOutputCapture(context); + try { + if (!outputCapture.matchers.isEmpty()) { + String output = outputCapture.toString(); + assertThat(output, allOf(outputCapture.matchers)); + } + } finally { + outputCapture.reset(); + } + } + + @Override + public boolean supportsParameter(ParameterContext parameterContext, ExtensionContext extensionContext) { + boolean isTestMethodLevel = extensionContext.getTestMethod().isPresent(); + boolean isOutputCapture = parameterContext.getParameter().getType() == OutputCapture.class; + return isTestMethodLevel && isOutputCapture; + } + + @Override + public Object resolveParameter(ParameterContext parameterContext, ExtensionContext extensionContext) { + return getOutputCapture(extensionContext); + } + + private OutputCapture getOutputCapture(ExtensionContext context) { + return getOrComputeIfAbsent(getStore(context), OutputCapture.class); + } + + private V getOrComputeIfAbsent(Store store, Class type) { + return store.getOrComputeIfAbsent(type, ReflectionSupport::newInstance, type); + } + + private Store getStore(ExtensionContext context) { + return context.getStore(Namespace.create(getClass())); + } + + } + + /** + * {@code OutputCapture} captures output to {@code System.out} and {@code System.err}. + * + *

+ * To obtain an instance of {@code OutputCapture}, declare a parameter of type {@code OutputCapture} in a JUnit + * Jupiter {@code @Test}, {@code @BeforeEach}, or {@code @AfterEach} method. + * + *

+ * {@linkplain #expect Expectations} are supported via Hamcrest matchers. + * + *

+ * To obtain all output to {@code System.out} and {@code System.err}, simply invoke {@link #toString()}. + * + * @author Phillip Webb + * @author Andy Wilkinson + * @author Sam Brannen + */ + static class OutputCapture { + + private final List> matchers = new ArrayList<>(); + + private CaptureOutputStream captureOut; + + private CaptureOutputStream captureErr; + + private ByteArrayOutputStream copy; + + void captureOutput() { + this.copy = new ByteArrayOutputStream(); + this.captureOut = new CaptureOutputStream(System.out, this.copy); + this.captureErr = new CaptureOutputStream(System.err, this.copy); + System.setOut(new PrintStream(this.captureOut)); + System.setErr(new PrintStream(this.captureErr)); + } + + void releaseOutput() { + System.setOut(this.captureOut.getOriginal()); + System.setErr(this.captureErr.getOriginal()); + this.copy = null; + } + + private void flush() { + try { + this.captureOut.flush(); + this.captureErr.flush(); + } catch (IOException ex) { + // ignore + } + } + + /** + * Verify that the captured output is matched by the supplied {@code matcher}. + * + *

+ * Verification is performed after the test method has executed. + * + * @param matcher + * the matcher + */ + public void expect(Matcher matcher) { + this.matchers.add(matcher); + } + + /** + * Return all captured output to {@code System.out} and {@code System.err} as a single string. + */ + @Override + public String toString() { + flush(); + return this.copy.toString(); + } + + void reset() { + this.matchers.clear(); + this.copy.reset(); + } + + private static class CaptureOutputStream extends OutputStream { + + private final PrintStream original; + + private final OutputStream copy; + + CaptureOutputStream(PrintStream original, OutputStream copy) { + this.original = original; + this.copy = copy; + } + + PrintStream getOriginal() { + return this.original; + } + + @Override + public void write(int b) throws IOException { + this.copy.write(b); + this.original.write(b); + this.original.flush(); + } + + @Override + public void write(byte[] b) throws IOException { + write(b, 0, b.length); + } + + @Override + public void write(byte[] b, int off, int len) throws IOException { + this.copy.write(b, off, len); + this.original.write(b, off, len); + } + + @Override + public void flush() throws IOException { + this.copy.flush(); + this.original.flush(); + } + + } + + } + +} diff --git a/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/sample/mybatis/SampleMybatisApplicationMainTest.java b/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/sample/mybatis/annotation/SampleMybatisApplicationMainTest.java similarity index 87% rename from mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/sample/mybatis/SampleMybatisApplicationMainTest.java rename to mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/sample/mybatis/annotation/SampleMybatisApplicationMainTest.java index 06baeaaf..95de4a43 100644 --- a/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/sample/mybatis/SampleMybatisApplicationMainTest.java +++ b/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/sample/mybatis/annotation/SampleMybatisApplicationMainTest.java @@ -13,14 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package sample.mybatis; +package sample.mybatis.annotation; import static org.assertj.core.api.Assertions.assertThat; import org.junit.jupiter.api.Test; -import extensions.CaptureSystemOutput; -import extensions.CaptureSystemOutput.OutputCapture; +import extensions.annotation.CaptureSystemOutput; +import extensions.annotation.CaptureSystemOutput.OutputCapture; /** * @author Kazuki Shimizu diff --git a/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/sample/mybatis/SampleMybatisApplicationTest.java b/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/sample/mybatis/annotation/SampleMybatisApplicationTest.java similarity index 88% rename from mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/sample/mybatis/SampleMybatisApplicationTest.java rename to mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/sample/mybatis/annotation/SampleMybatisApplicationTest.java index 6c3aaaba..90d332ea 100644 --- a/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/sample/mybatis/SampleMybatisApplicationTest.java +++ b/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/sample/mybatis/annotation/SampleMybatisApplicationTest.java @@ -13,15 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package sample.mybatis; +package sample.mybatis.annotation; import static org.assertj.core.api.Assertions.assertThat; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; -import extensions.CaptureSystemOutput; -import extensions.CaptureSystemOutput.OutputCapture; +import extensions.annotation.CaptureSystemOutput; +import extensions.annotation.CaptureSystemOutput.OutputCapture; /** * @author Eddú Meléndez diff --git a/mybatis-spring-boot-samples/mybatis-spring-boot-sample-web/src/test/java/sample/mybatis/mapper/CityMapperTest.java b/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/sample/mybatis/annotation/mapper/CityMapperTest.java similarity index 93% rename from mybatis-spring-boot-samples/mybatis-spring-boot-sample-web/src/test/java/sample/mybatis/mapper/CityMapperTest.java rename to mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/sample/mybatis/annotation/mapper/CityMapperTest.java index e0286bb8..d8abbaaf 100644 --- a/mybatis-spring-boot-samples/mybatis-spring-boot-sample-web/src/test/java/sample/mybatis/mapper/CityMapperTest.java +++ b/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/sample/mybatis/annotation/mapper/CityMapperTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package sample.mybatis.mapper; +package sample.mybatis.annotation.mapper; import static org.assertj.core.api.Assertions.assertThat; @@ -21,7 +21,7 @@ import org.mybatis.spring.boot.test.autoconfigure.MybatisTest; import org.springframework.beans.factory.annotation.Autowired; -import sample.mybatis.domain.City; +import sample.mybatis.annotation.domain.City; /** * Tests for {@link CityMapper}. diff --git a/mybatis-spring-boot-samples/mybatis-spring-boot-sample-war/src/test/java/sample/mybatis/mapper/MapperTestApplication.java b/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/sample/mybatis/annotation/mapper/MapperTestApplication.java similarity index 89% rename from mybatis-spring-boot-samples/mybatis-spring-boot-sample-war/src/test/java/sample/mybatis/mapper/MapperTestApplication.java rename to mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/sample/mybatis/annotation/mapper/MapperTestApplication.java index 2424f33a..fea4fea4 100644 --- a/mybatis-spring-boot-samples/mybatis-spring-boot-sample-war/src/test/java/sample/mybatis/mapper/MapperTestApplication.java +++ b/mybatis-spring-boot-samples/mybatis-spring-boot-sample-annotation/src/test/java/sample/mybatis/annotation/mapper/MapperTestApplication.java @@ -13,15 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package sample.mybatis.mapper; +package sample.mybatis.annotation.mapper; import org.springframework.boot.autoconfigure.SpringBootApplication; /** * The Spring Boot Application for testing {@link org.mybatis.spring.boot.test.autoconfigure.MybatisTest @MybatisTest}. *

- * This class has role for prevent to run the {@link sample.mybatis.SampleWebApplication}. For more detail information, - * please refer + * This class has role for prevent to run the {@link sample.mybatis.annotation.SampleAnnotationApplication}. For more + * detail information, please refer * Here. * * @author Kazuki Shimizu diff --git a/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/main/java/sample/mybatis/SampleFreeMarkerApplication.java b/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/main/java/sample/mybatis/freemarker/legacy/SampleFreeMarkerApplication.java similarity index 93% rename from mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/main/java/sample/mybatis/SampleFreeMarkerApplication.java rename to mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/main/java/sample/mybatis/freemarker/legacy/SampleFreeMarkerApplication.java index 8c7678e4..ad75e292 100644 --- a/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/main/java/sample/mybatis/SampleFreeMarkerApplication.java +++ b/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/main/java/sample/mybatis/freemarker/legacy/SampleFreeMarkerApplication.java @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package sample.mybatis; +package sample.mybatis.freemarker.legacy; import org.springframework.boot.CommandLineRunner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; -import sample.mybatis.mapper.CityMapper; +import sample.mybatis.freemarker.legacy.mapper.CityMapper; /** * @author Kazuki Shimizu diff --git a/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/main/java/sample/mybatis/freemarker/legacy/domain/City.java b/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/main/java/sample/mybatis/freemarker/legacy/domain/City.java new file mode 100644 index 00000000..6c598b70 --- /dev/null +++ b/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/main/java/sample/mybatis/freemarker/legacy/domain/City.java @@ -0,0 +1,72 @@ +/* + * Copyright 2015-2021 the original author or authors. + * + * 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 sample.mybatis.freemarker.legacy.domain; + +import java.io.Serializable; + +/** + * @author Kazuki Shimizu + */ +public class City implements Serializable { + + private static final long serialVersionUID = 1L; + + private Long id; + + private String name; + + private String state; + + private String country; + + public Long getId() { + return this.id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getState() { + return this.state; + } + + public void setState(String state) { + this.state = state; + } + + public String getCountry() { + return this.country; + } + + public void setCountry(String country) { + this.country = country; + } + + @Override + public String toString() { + return getId() + "," + getName() + "," + getState() + "," + getCountry(); + } + +} diff --git a/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/main/java/sample/mybatis/mapper/CityMapper.java b/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/main/java/sample/mybatis/freemarker/legacy/mapper/CityMapper.java similarity index 91% rename from mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/main/java/sample/mybatis/mapper/CityMapper.java rename to mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/main/java/sample/mybatis/freemarker/legacy/mapper/CityMapper.java index 0be13840..d5f8a45e 100644 --- a/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/main/java/sample/mybatis/mapper/CityMapper.java +++ b/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/main/java/sample/mybatis/freemarker/legacy/mapper/CityMapper.java @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package sample.mybatis.mapper; +package sample.mybatis.freemarker.legacy.mapper; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; -import sample.mybatis.domain.City; +import sample.mybatis.freemarker.legacy.domain.City; /** * @author Kazuki Shimizu diff --git a/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/main/resources/application.properties b/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/main/resources/application.properties index fd28c049..247d218e 100644 --- a/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/main/resources/application.properties +++ b/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/main/resources/application.properties @@ -1,5 +1,5 @@ # -# Copyright 2015-2019 the original author or authors. +# Copyright 2015-2021 the original author or authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ # logging.level.root=WARN -logging.level.sample.mybatis.mapper=TRACE +logging.level.sample.mybatis.freemarker.legacy.mapper=TRACE mybatis.mapper-locations=classpath*:/mappers/*.xml -mybatis.type-aliases-package=sample.mybatis.domain +mybatis.type-aliases-package=sample.mybatis.freemarker.legacy.domain diff --git a/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/main/resources/mappers/CityMapper.xml b/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/main/resources/mappers/CityMapper.xml index 33503e0d..9bbd069d 100644 --- a/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/main/resources/mappers/CityMapper.xml +++ b/mybatis-spring-boot-samples/mybatis-spring-boot-sample-freemarker-legacy/src/main/resources/mappers/CityMapper.xml @@ -1,7 +1,7 @@