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 Mar 10, 2024
1 parent f879e3b commit 1761057
Show file tree
Hide file tree
Showing 7 changed files with 595 additions and 0 deletions.
51 changes: 51 additions & 0 deletions docs/spring/csf5cca9fe-de98-11ee-954e-acde48001122.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/**
* 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.type;

import java.sql.CallableStatement;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.time.OffsetDateTime;

/**
* @since 3.4.5
* @author Tomas Rohovsky
*/
public class OffsetDateTimeTypeHandler extends BaseTypeHandler<OffsetDateTime> {

@Override
public void setNonNullParameter(PreparedStatement ps, int i, OffsetDateTime parameter, JdbcType jdbcType)
throws SQLException {
ps.setObject(i, parameter);
}

@Override
public OffsetDateTime getNullableResult(ResultSet rs, String columnName) throws SQLException {
return rs.getObject(columnName, OffsetDateTime.class);
}

@Override
public OffsetDateTime getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
return rs.getObject(columnIndex, OffsetDateTime.class);
}

@Override
public OffsetDateTime getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
return cs.getObject(columnIndex, OffsetDateTime.class);
}

}
27 changes: 27 additions & 0 deletions docs/spring/csf603f738-de98-11ee-954e-acde48001122.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/**
* Copyright 2009-2018 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.duplicate_statements;

import org.apache.ibatis.session.RowBounds;

import java.util.List;

public interface Mapper {

List<User> getAllUsers();

List<User> getAllUsers(RowBounds rowBounds);
}
56 changes: 56 additions & 0 deletions docs/spring/csf63d76a2-de98-11ee-954e-acde48001122.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/**
* Copyright 2009-2015 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.typehandler;

public class User {

private Integer id;
private String name;
private String city;
private String state;

public Integer getId() {
return id;
}

public void setId(Integer id) {
this.id = id;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public String getCity() {
return city;
}

public void setCity(String city) {
this.city = city;
}

public String getState() {
return state;
}

public void setState(String state) {
this.state = state;
}
}
63 changes: 63 additions & 0 deletions docs/spring/csf67af4b4-de98-11ee-954e-acde48001122.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/**
* Copyright 2009-2016 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.keygen;

/**
* @author liuzh
*/
public class Country {
private Integer id;
private String countryname;
private String countrycode;

public Country() {
}

public Country(String countryname, String countrycode) {
this.countryname = countryname;
this.countrycode = countrycode;
}

public Country(Integer id, String countryname, String countrycode) {
this.id = id;
this.countryname = countryname;
this.countrycode = countrycode;
}

public Integer getId() {
return id;
}

public void setId(Integer id) {
this.id = id;
}

public String getCountryname() {
return countryname;
}

public void setCountryname(String countryname) {
this.countryname = countryname;
}

public String getCountrycode() {
return countrycode;
}

public void setCountrycode(String countrycode) {
this.countrycode = countrycode;
}
}
30 changes: 30 additions & 0 deletions docs/spring/csf6b173d6-de98-11ee-954e-acde48001122.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package com.huifer.aop.advisor;

import org.springframework.aop.ClassFilter;

/**
* 描述:
* 类过滤器
*
* @author huifer
* @date 2019-03-03
*/
public class MyClassFilter implements ClassFilter {
/***
* 判断当前实现类是否是我们的织入所相关的类
* 本次案例中 男性上厕所不需要带纸巾,女性上厕所需要带纸巾,
* 那么BaseAopPointCut接口应该要对女性进行判断,完成此步骤后还需要一个方法匹配器 ,
* 再次我们只要对上厕所匹配 吃饭不需要匹配
*
* @param aClass 当前被拦截的类
* @return boolean
*/
@Override
public boolean matches(Class<?> aClass) {
if (aClass == WoMan.class) {

return true;
}
return false;
}
}
24 changes: 24 additions & 0 deletions docs/spring/csf6e3653a-de98-11ee-954e-acde48001122.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.huifer.hystrix;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

/**
* <p>Title : HystrixApp </p>
* <p>Description : </p>
*
* @author huifer
* @date 2019-05-30
*/
@SpringBootApplication
@EnableHystrix
@EnableAspectJAutoProxy(proxyTargetClass = true)
public class HystrixApp {

public static void main(String[] args) {
SpringApplication.run(HystrixApp.class, args);
}

}
Loading

0 comments on commit 1761057

Please sign in to comment.