❤️ [java] [javaparser] ❤️ --- Stack Overflow Stats --- 🥇 0 | Reputation: 73 🥈 1 | Questions: 3 🥉 8 | Answers: 1
Total Solved Problem 🎉 345 🎉 --- Solved Problem List --- Easy 🌕 🌕 🌘 🌑 🌑 🌑 🌑 🌑 🌑 🌑 21% [129] Medium 🌕 🌗 🌑 🌑 🌑 🌑 🌑 🌑 🌑 🌑 15% [198] Hard 🌘 🌑 🌑 🌑 🌑 🌑 🌑 🌑 🌑 🌑 3% [18]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%-- | |
Created by IntelliJ IDEA. | |
User: surpr | |
Date: 2020/4/20 | |
Time: 下午 01:16 | |
To change this template use File | Settings | File Templates. | |
--%> | |
<%@ page contentType="text/html;charset=UTF-8" language="java" %> | |
<%@ taglib prefix="s" uri="/struts-tags" %> | |
<html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package action; | |
import dao.CarDao; | |
import model.Car; | |
import org.springframework.context.ApplicationContext; | |
import org.springframework.context.support.ClassPathXmlApplicationContext; | |
public class CarSaveAction { | |
String name; | |
String number; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%-- | |
Created by IntelliJ IDEA. | |
User: surpr | |
Date: 2020/4/19 | |
Time: 下午 08:43 | |
To change this template use File | Settings | File Templates. | |
--%> | |
<%@ page contentType="text/html;charset=UTF-8" language="java" %> | |
<%@ taglib prefix="s" uri="/struts-tags" %> | |
<html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package action; | |
import dao.CarDao; | |
import model.Car; | |
import org.springframework.context.ApplicationContext; | |
import org.springframework.context.support.ClassPathXmlApplicationContext; | |
public class CarAction { | |
String name; | |
String number; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package model; | |
public class Car { | |
private Long id; | |
private String name; | |
private String number; | |
public Car() {} | |
public Long getId() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package dao; | |
import model.Car; | |
import org.hibernate.Query; | |
import org.hibernate.Session; | |
import org.hibernate.Transaction; | |
import util.HibernateUtil; | |
public class CarDaoImpl implements CarDao { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package dao; | |
import model.Car; | |
public interface CarDao { | |
void save(Car car); | |
Car carQuery(String number); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package util; | |
import org.hibernate.SessionFactory; | |
import org.hibernate.boot.registry.StandardServiceRegistryBuilder; | |
import org.hibernate.cfg.Configuration; | |
import org.hibernate.service.ServiceRegistry; | |
public class HibernateUtil { | |
private static SessionFactory sessionFactory; | |
static { |
NewerOlder