Tourism website design based on SSH framework

Project running video: Click to view

I. System screenshots

Development environment and technical architecture

System architecture: The development of this system is to use Java as the main programming language programming development, to the mainstream database MySQL storage data, SSM framework as the main technical support with Jsp, CSS as a page to display Java, JavaScript to complete the logical interaction of the page, at the same time the introduction of editor plug-in UEditor, Develop a simple and practical, functional travel website.

Development environment: JDK7+ Eclipse + Tomcat7 +mysql5.5

Iii. System functions

1 User Identity

Website: you can view the website mainly introduces information hotel is introduced: you can look at yourself or the introduction of various star hotel information posted by other users, users can comment on tourism is introduced: after login to view their recommendation or other users of various tourism information, after the user login, can comment on vehicles is introduced: You can view yourself or other users published different means of transport information, including the type ah speed ah price ah and so on, login can comment on the hotel introduction: you can view yourself or other users published what kind of star hotel information, login can comment on overseas city recommendation: You can view the relevant information of overseas cities published by yourself or other users, you can add routes and so on, and you can comment on the login user login: by filling in the account number password and other information to log in to the website user registration: by filling in the account number information and personal information for registration resource publishing: After logging in, users can publish recommendations about hotels, tourism, transportation, cities and other tourism-related information

2 Administrator Status

User management For the front desk user registration information management, including increase, delete operations such as modified Administrators to manage For administrators information management, including increase, delete operations such as modified Website management To manage site information Classification management Classification of the data, including travel related information, including travel, city, Management of vehicle information plate management For the management of various plate information published by users, can be top and delete operations such as evaluation management for users to evaluate a variety of plate information, delete malicious comments

Iv. Document screenshots

Download link

Click on the download

System entity class

1 User entity class

package com.my.pro.model;


import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.engine.transaction.spi.IsolationDelegate;

import com.sun.jndi.url.iiopname.iiopnameURLContextFactory;


@Entity
@Table(name="user")
public class User {
	private int id;
	private String loginName;/ / login name
	private String passWord;/ / password
	private String phone;/ / cell phone
	private String email;/ / email
	private String realName;/ / name
	private int IsDelete;// 0 not deleted 1: deleted
	@Id
	@GeneratedValue
	public int getId(a) {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getPassWord(a) {
		return passWord;
	}
	public void setPassWord(String passWord) {
		this.passWord = passWord;
	}
	public String getPhone(a) {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public String getRealName(a) {
		return realName;
	}
	public void setRealName(String realName) {
		this.realName = realName;
	}
	public String getLoginName(a) {
		return loginName;
	}
	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}
	public String getEmail(a) {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public int getIsDelete(a) {
		return IsDelete;
	}
	public void setIsDelete(int isDelete) { IsDelete = isDelete; }}Copy the code

2. News entities

package com.my.pro.model;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;


@Entity
@Table(name="news")
public class News{
    
	private int id;
	
	private String title;/ / title
	
	private String content;/ / content
	
	private Date addTime;// Add time
	
	private String imageUrl;// Image path
	
	private Category  category;/ / category id
	
	private int isDelete;//0 not deleted 1: deleted
	
	private int status;0: no top 1: no top
	
	private User user;/ / user

	
	@Id
	@GeneratedValue
	public int getId(a) {
		return id;
	}

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

	public String getTitle(a) {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getContent(a) {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Date getAddTime(a) {
		return addTime;
	}

	public void setAddTime(Date addTime) {
		this.addTime = addTime;
	}

	public String getImageUrl(a) {
		return imageUrl;
	}

	public void setImageUrl(String imageUrl) {
		this.imageUrl = imageUrl;
	}


	public int getStatus(a) {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public int getIsDelete(a) {
		return isDelete;
	}

	public void setIsDelete(int isDelete) {
		this.isDelete = isDelete;
	}


	@ManyToOne
	@JoinColumn(name="user_id")
	public User getUser(a) {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@ManyToOne
	@JoinColumn(name="category_id")
	public Category getCategory(a) {
		return category;
	}

	public void setCategory(Category category) {
		this.category = category; }}Copy the code

3 Announcement entity class

package com.my.pro.model;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name="introduce")
public class Introduce {
	
	private int id;
	
	private String title;
	
	private String content;
	
	private Date addTime;
	
	private String imageUrl;

	@Id
	@GeneratedValue
	public Integer getId(a) {
		return this.id;
	}
	
	public void setId(Integer id) {
		this.id = id;
	}
	
	public String getTitle(a) {
		return this.title;
	}
	
	public void setTitle(String title) {
		this.title = title;
	}
	
	public String getContent(a) {
		return this.content;
	}
	
	public void setContent(String content) {
		this.content = content;
	}
	
	public java.util.Date getAddTime(a) {
		return this.addTime;
	}
	
	public void setAddTime(java.util.Date addTime) {
		this.addTime = addTime;
	}	
	
	public String getImageUrl(a) {
		return this.imageUrl;
	}
	
	public void setImageUrl(String imageUrl) {
		this.imageUrl = imageUrl; }}Copy the code

4 Comment on entity classes

package com.my.pro.model;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/** * comments *@author* * /
@Entity
@Table(name="comment")
public class Comment {
	private int id;
	private User user;/ / user
	private String content;// Comment content
	private Date createTime;// Comment time
	private int isDelete;// Delete 1 Yes 2 No
	private News news;/ / goods
	private Category category;/ / classification
	@Id
	@GeneratedValue
	public int getId(a) {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	@ManyToOne
	@JoinColumn(name="user_id")
	public User getUser(a) {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	
	public String getContent(a) {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public Date getCreateTime(a) {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public int getIsDelete(a) {
		return isDelete;
	}
	public void setIsDelete(int isDelete) {
		this.isDelete = isDelete;
	}
	@ManyToOne
	@JoinColumn(name="news_id")
	public News getNews(a) {
		return news;
	}
	public void setNews(News news) {
		this.news = news;
	}
	@ManyToOne
	@JoinColumn(name="category_id")
	public Category getCategory(a) {
		return category;
	}
	public void setCategory(Category category) {
		this.category = category; }}Copy the code

More information about the project can be found in the source of the SSH-based travel website