Skip to content

Commit

Permalink
write a line into test.file
Browse files Browse the repository at this point in the history
  • Loading branch information
huifer committed Jan 6, 2025
1 parent 0b6545f commit 7d18655
Show file tree
Hide file tree
Showing 6 changed files with 191 additions and 0 deletions.
39 changes: 39 additions & 0 deletions docs/spring/cs9939df76-cbce-11ef-ae73-acde48001122.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/**
* Copyright 2009-2019 the original author or authors.
* <p>
* 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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* 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]);
}
}

}
28 changes: 28 additions & 0 deletions docs/spring/cs999b521a-cbce-11ef-ae73-acde48001122.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/**
* Copyright 2009-2019 the original author or authors.
* <p>
* 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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* 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<Person> selectAllFlush();

List<Person> selectAllNoFlush();
}
63 changes: 63 additions & 0 deletions docs/spring/cs99f10ed0-cbce-11ef-ae73-acde48001122.java
Original file line number Diff line number Diff line change
@@ -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();
}
}
13 changes: 13 additions & 0 deletions docs/spring/cs9a40ecac-cbce-11ef-ae73-acde48001122.java
Original file line number Diff line number Diff line change
@@ -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;
}
}
20 changes: 20 additions & 0 deletions docs/spring/cs9a96b1aa-cbce-11ef-ae73-acde48001122.java
Original file line number Diff line number Diff line change
@@ -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("开始玩了");
}
}
28 changes: 28 additions & 0 deletions docs/spring/cs9b0b4cd6-cbce-11ef-ae73-acde48001122.java
Original file line number Diff line number Diff line change
@@ -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;

/**
* <p>Title : HelloClient </p>
* <p>Description : </p>
*
* @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"));
}

}

0 comments on commit 7d18655

Please sign in to comment.