diff --git a/docs/spring/cs9939df76-cbce-11ef-ae73-acde48001122.java b/docs/spring/cs9939df76-cbce-11ef-ae73-acde48001122.java new file mode 100644 index 00000000..c5b02ee4 --- /dev/null +++ b/docs/spring/cs9939df76-cbce-11ef-ae73-acde48001122.java @@ -0,0 +1,39 @@ +/** + * Copyright 2009-2019 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 org.apache.ibatis.submitted.default_method; + +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +public interface Mapper { + + @Select("select * from users where id = #{id}") + User getUserById(Integer id); + + @Select("select * from users where id = #{id} and name = #{name}") + User getUserByIdAndName(@Param("name") String name, @Param("id") Integer id); + + default User defaultGetUser(Object... args) { + return getUserById((Integer) args[0]); + } + + interface SubMapper extends Mapper { + default User defaultGetUser(Object... args) { + return getUserByIdAndName((String) args[0], (Integer) args[1]); + } + } + +} diff --git a/docs/spring/cs999b521a-cbce-11ef-ae73-acde48001122.java b/docs/spring/cs999b521a-cbce-11ef-ae73-acde48001122.java new file mode 100644 index 00000000..dc3fb27c --- /dev/null +++ b/docs/spring/cs999b521a-cbce-11ef-ae73-acde48001122.java @@ -0,0 +1,28 @@ +/** + * Copyright 2009-2019 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 org.apache.ibatis.submitted.disallowdotsonnames; + +import java.util.List; + +public interface PersonMapper { + Person selectByIdFlush(int id); + + Person selectByIdNoFlush(int id); + + List selectAllFlush(); + + List selectAllNoFlush(); +} diff --git a/docs/spring/cs99f10ed0-cbce-11ef-ae73-acde48001122.java b/docs/spring/cs99f10ed0-cbce-11ef-ae73-acde48001122.java new file mode 100644 index 00000000..69eaa90d --- /dev/null +++ b/docs/spring/cs99f10ed0-cbce-11ef-ae73-acde48001122.java @@ -0,0 +1,63 @@ +package com.huifer.ssm.pojo; + +public class UserKey { + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database column user.Host + * + * @mbg.generated + */ + private String host; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database column user.User + * + * @mbg.generated + */ + private String user; + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column user.Host + * + * @return the value of user.Host + * @mbg.generated + */ + public String getHost() { + return host; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column user.Host + * + * @param host the value for user.Host + * @mbg.generated + */ + public void setHost(String host) { + this.host = host == null ? null : host.trim(); + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column user.User + * + * @return the value of user.User + * @mbg.generated + */ + public String getUser() { + return user; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column user.User + * + * @param user the value for user.User + * @mbg.generated + */ + public void setUser(String user) { + this.user = user == null ? null : user.trim(); + } +} \ No newline at end of file diff --git a/docs/spring/cs9a40ecac-cbce-11ef-ae73-acde48001122.java b/docs/spring/cs9a40ecac-cbce-11ef-ae73-acde48001122.java new file mode 100644 index 00000000..d1e2e561 --- /dev/null +++ b/docs/spring/cs9a40ecac-cbce-11ef-ae73-acde48001122.java @@ -0,0 +1,13 @@ +package com.huifer.mybatis.entity; + +public class PersonQuery { + private String name; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/docs/spring/cs9a96b1aa-cbce-11ef-ae73-acde48001122.java b/docs/spring/cs9a96b1aa-cbce-11ef-ae73-acde48001122.java new file mode 100644 index 00000000..4b725ce8 --- /dev/null +++ b/docs/spring/cs9a96b1aa-cbce-11ef-ae73-acde48001122.java @@ -0,0 +1,20 @@ +package com.huifer.mybatis.proxy; + +/** + * 描述: + * 主要业务的实现 + * + * @author huifer + * @date 2019-02-24 + */ +public class Person implements BaseMothed { + @Override + public void eat() { + System.out.println("吃东西了"); + } + + @Override + public void play() { + System.out.println("开始玩了"); + } +} diff --git a/docs/spring/cs9b0b4cd6-cbce-11ef-ae73-acde48001122.java b/docs/spring/cs9b0b4cd6-cbce-11ef-ae73-acde48001122.java new file mode 100644 index 00000000..49c32dd4 --- /dev/null +++ b/docs/spring/cs9b0b4cd6-cbce-11ef-ae73-acde48001122.java @@ -0,0 +1,28 @@ +package com.huifer.dubbo.client; + +import com.huifer.dubbo.server.api.DubboHello; +import com.huifer.dubbo.server.api.DubboVersion1; +import org.springframework.context.support.ClassPathXmlApplicationContext; + +/** + *

Title : HelloClient

+ *

Description :

+ * + * @author huifer + * @date 2019-06-13 + */ +public class HelloClient { + + public static void main(String[] args) { + ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext( + "dubbo-client.xml"); + DubboHello dubboHello = (DubboHello) context.getBean("dubboHello"); + +// String helloDubbo = dubboHello.hello("hello dubbo"); +// System.out.println(helloDubbo); + + DubboVersion1 dv1 = (DubboVersion1) context.getBean("acac"); + System.out.println(dv1.sayHelloV1("hello-dubbo")); + } + +}