spring-session SessionAttributeForm 源码

  • 2022-08-16
  • 浏览 (353)

spring-session SessionAttributeForm 代码

文件路径:/spring-session-samples/spring-session-sample-boot-mongodb-reactive/src/main/java/org/springframework/session/mongodb/examples/SessionAttributeForm.java

/*
 * Copyright 2014-2017 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
 *
 *      https://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.springframework.session.mongodb.examples;

import java.util.Objects;

/**
 * @author Rob Winch
 * @author Greg Turnquist
 * @since 5.0
 */
public class SessionAttributeForm {

	private String attributeName;

	private String attributeValue;

	public String getAttributeName() {
		return this.attributeName;
	}

	public void setAttributeName(String attributeName) {
		this.attributeName = attributeName;
	}

	public String getAttributeValue() {
		return this.attributeValue;
	}

	public void setAttributeValue(String attributeValue) {
		this.attributeValue = attributeValue;
	}

	@Override
	public boolean equals(Object o) {

		if (this == o) {
			return true;
		}
		if (!(o instanceof SessionAttributeForm)) {
			return false;
		}
		SessionAttributeForm that = (SessionAttributeForm) o;
		return Objects.equals(this.attributeName, that.attributeName)
				&& Objects.equals(this.attributeValue, that.attributeValue);
	}

	@Override
	public int hashCode() {
		return Objects.hash(this.attributeName, this.attributeValue);
	}

	@Override
	public String toString() {

		return "SessionAttributeForm{" + "attributeName='" + this.attributeName + '\'' + ", attributeValue='"
				+ this.attributeValue + '\'' + '}';
	}

}

相关信息

spring-session 源码目录

相关文章

spring-session SessionController 源码

spring-session SpringSessionMongoReactiveApplication 源码

0  赞