gwdnom的gravatar头像
gwdnom 2015-05-15 20:18:43

struts+Hibernate+MySQL的新闻发布管理系统后台+前台

声明:这个项目是从同学那的毕业设计项目,简单的新闻发布系统!

首先这是后台系统的登录:

struts+Hibernate+MySQL的新闻发布管理系统后台+前台

后台具体页面:

struts+Hibernate+MySQL的新闻发布管理系统后台+前台

 

struts+Hibernate+MySQL的新闻发布管理系统后台+前台

这是前台页面:

struts+Hibernate+MySQL的新闻发布管理系统后台+前台

struts+Hibernate+MySQL的新闻发布管理系统后台+前台

项目截图:

struts+Hibernate+MySQL的新闻发布管理系统后台+前台

Hibernate配置文件需要修改,注意使用时的数据库密码:

<!-- 配置数据库连接 -->
    <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
    <property name="connection.url">jdbc:mysql://localhost:3306/mynews?useUnicode=true&amp;amp;characterEncoding=utf8</property>
    <property name="connection.username">root</property>
    <!-- 指定数据库用户名 -->
    <property name="connection.password">123456</property>
    <!-- 指定数据库密码 -->
    <property name="dialect">org.hibernate.dialect.MySQLDialect</property>
    <!-- 根据映射文件自动创建表(第一次创建,以后是修改) -->
    <property name="hbm2ddl.auto">update</property>
    <property name="javax.persistence.validation.mode">none</property>
    <property name="show_sql">true</property>
    <!--指定持久化类映射文件-->
    <property name="myeclipse.connection.profile">mysql</property>
    <mapping resource="com/mxl/models/AFNews.hbm.xml" />
    <mapping resource="com/mxl/models/Category.hbm.xml" />
    <mapping resource="com/mxl/models/Manager.hbm.xml" />
    <mapping resource="com/mxl/models/News.hbm.xml" />

Struts的部分控制文件

<constant name="struts.i18n.encoding" value="gb2312"/>
    <package name="default" extends="struts-default" namespace="/">
        <action name="news" class="com.mxl.actions.NewsAction">
            <result name="main">/news.jsp</result>
            <result name="details">/details_news.jsp</result>
            <result name="update">/update_news.jsp</result>
            <result type="redirectAction">
                <param name="actionName">news</param>
                <param name="namespace">/</param>
                <param name="topId">${#session.topId}</param>
                <param name="pageNo">${pageNo}</param>
            </result>
            <result name="addInput">/input_news.jsp</result>
        </action>
        <action name="category" class="com.mxl.actions.CategoryAction">
            <result name="clist">/category_list.jsp</result>
            <result name="addInput">/input_category.jsp</result>
            <result type="redirectAction">
                <param name="actionName">category</param>
                <param name="namespace">/</param>
                <param name="category.topId">${#session.topId}</param>
            </result>
            <result name="updateInput">/update_category.jsp</result>
        </action>
        <action name="affiche" class="com.mxl.actions.AFAction">
            <result name="main">/affiches.jsp</result>
            <result name="update">/update_affiche.jsp</result>
            <result name="details">/details_affiche.jsp</result>
            <result name="addInput">/input_affiche.jsp</result>
            <result type="redirectAction">
                <param name="actionName">affiche</param>
                <param name="namespace">/</param>
                <param name="sign">${#session.sign}</param>
            </result>
        </action>

打赏

文件名:使用stucts+Hibernate+MySQL的新闻发布系统后台+前台+新闻发布系统.rar,文件大小:11084.126K 下载
  • /
      • /NewsPublish
        • /NewsPublish/.classpath
        • /NewsPublish/.mymetadata
        • /NewsPublish/.project
          • /NewsPublish/.settings
            • /NewsPublish/.settings/.jsdtscope
            • /NewsPublish/.settings/org.eclipse.jdt.core.prefs
            • /NewsPublish/.settings/org.eclipse.wst.common.component
            • /NewsPublish/.settings/org.eclipse.wst.common.project.facet.core.xml
            • /NewsPublish/.settings/org.eclipse.wst.jsdt.ui.superType.container
            • /NewsPublish/.settings/org.eclipse.wst.jsdt.ui.superType.name
最代码最近下载分享源代码列表最近下载
泓鼎168  LV20 2023年4月11日
wanglinddad  LV55 2022年3月7日
一念之间__2020  LV6 2022年1月11日
微信网友_5768552477921280  LV6 2021年12月31日
过过成功尺寸  LV7 2021年12月6日
evagsd  LV6 2021年12月4日
xxxdragon  LV10 2021年9月9日
wurongchuyu  LV5 2021年5月14日
feiyang991128  LV4 2021年5月12日
aybk666  LV1 2021年3月26日
最代码最近浏览分享源代码列表最近浏览
273776525  LV3 1月15日
WBelong  LV7 2023年12月26日
LITIANYU084414  LV11 2023年11月28日
chenlie  LV2 2023年11月7日
liang85  LV1 2023年6月30日
pangzhihui  LV14 2023年5月11日
uni-code_0123  LV1 2023年4月25日
zhyp9000  LV1 2023年4月25日
泓鼎168  LV20 2023年4月11日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友