
javaee 框架
夏肖潇
前端小白,摸索学习中~
展开
-
Struts2框架——基于struts2计算任意两个数据的和
package model;public class Add { double x; double y; double sum; public double getX() { return x; } public void setX(double x) { this.x = x; } public double getY() { retu...原创 2020-01-02 21:35:34 · 483 阅读 · 0 评论 -
Struts2框架——搭建环境
建立一个web工程 在struts-2.3.37\apps\WEB-INF\lib下复制jar包,导入web工程lib目录下,并给每一个build path 在struts-2.3.37\apps\WEB-INF\classes下复制struts.xml文件到web工程的src目录下 建立该web工程的web.xml文件,在struts-2.3.37\apps\...原创 2020-01-02 19:29:58 · 151 阅读 · 0 评论 -
SSH框架——在Servlet中访问Spring IoC实例对象
package com.edu.Spring;import java.io.IOException;import java.io.PrintWriter;import javax.servlet.ServletContext;import javax.servlet.ServletException;import javax.servlet.annotation.WebServle...原创 2019-12-13 10:10:40 · 214 阅读 · 0 评论 -
SSH框架——jsp中访问Spring IoC实例对象
web.xml<?xml version="1.0" encoding="UTF-8"?><web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmln...原创 2019-12-12 17:21:42 · 160 阅读 · 0 评论 -
Spring框架——Bean的作用域(singleton和prototype)
package news;public class Students { private String name; private int age; public Students(String name, int age) { super(); this.name = name; this.age = age; } public Students() { supe...原创 2019-11-28 17:21:22 · 175 阅读 · 0 评论 -
Spring框架——基于XML文件方式的Bean配置
package news;public class Address {private String city;private String school;public Address(String city, String school) { super(); this.city = city; this.school = school;}public Address()...原创 2019-11-28 16:55:26 · 164 阅读 · 0 评论 -
Spring框架——采用Java工程实现Hello World!的实现
package com.edu;public class HelloBean { private String name; private String course; private Double score; public HelloBean(String name, String course, Double score) { super(); this.name ...原创 2019-11-21 17:03:41 · 194 阅读 · 0 评论 -
Hibernate框架—— 一对一映射(共享主键方式双向关联)
package key;public class Person { private int id; private String name; private IdCard idcard; public int getId() { return id; } public void setId(int id) { this.id = id; } public String...原创 2019-11-28 17:31:10 · 189 阅读 · 0 评论