-
As long as these xml are loaded, these bean objects will be instantiated and added to the spring container, indexed by id, it doesn't matter which xml file it is in, it only needs to appear once, and other xml can also be referenced.
-
Spring definitions are global, you define them in one place, and all other files can refer to them, and similarly if you define beans with the same name in different spring files, then the loaded ones will be overwritten.
Therefore, when defining the bean ID, make sure that it is unique.
-
src and webroot are at the same level, your class is under src, but you are under web-inf, and web-inf is under webroot, so.
string path="webroot/web-inf/";
-
You don't have to write anything, just write it absolutely, but you click to see if your profile name is not.
-
From the error, it can be seen that there is no nosuchmethoderror, which should be the imported log jar package (jboss-logging) has a conflict or the introduced log jar package version is too low. You can find out if jboss-logging has multiple versions of those packages.
-
Your getMessageLogger() method is wrong and of the wrong type.
-
It is the server software bai that must have du, any server software (tomcat jboss etc.), when it starts.
The DAO first loads the file, as per the text.
-
If lz knows these with bai
If you put the file, then don't talk about du, zhi is better than dao in terms of function, and you can manage the version hibernate separately, or manage both hibernate and struts at the same time
Configure the SessionFactory and the classes in the project in Spring (you don't need to delete new when invoking, and use them directly by injection).
Hibernate is responsible for managing data manipulation, etc. (along with HBM boxes, pojo classes, or directly using injections).
In fact, it can be saved.
Struts is to control the conversion, generally is to distribute the received requests to where to deal with the Spring management struts, in the past, the position of the class was written directly in the struts, if the position of the class is injected into the spring, then the name in the corresponding class configuration in the spring can be directly written in the struts.
-
This is the transaction that configures spring.
Where: indicates a method that starts with add, and the required transaction is enabled. where required is the type of transaction propagation mechanism.
About the Transaction Propagation Mechanism:
propagation required If there is no current transaction, create a new transaction, and if there is already a transaction, add it to the transaction. This is the most common option.
Propagation supports the current transaction and executes it as a non-transaction if there is no current transaction.
propagation mandatory uses the current transaction and throws an exception if there is no current transaction.
propagation requires new to create a new transaction, and if there is currently a transaction, suspend the current transaction.
propagation not supported executes the operation in a non-transactional manner, suspending the current transaction if it currently exists.
Propagation never executes in a non-transactional manner, throws an exception if there is currently a transaction.
Propagation nested is executed within a nested transaction if there is currently a transaction. If there are no current transactions, do something similar to propagation required.
-
Both are Spring management transaction scopes, and the method names match.
-
name: means that the method name must start with a string before an asterisk in quotation marks, propagation="required": It means that it must be named like this, which is actually modifying, deleting, and adding operations.
There is no restriction on the method name of the query operation.
-
This is Spring's transaction management configuration"add*","edit*","remove*"These methods are incorporated into Spring's transaction management.
-
**Error? Too little information is provided.
-
The AOP side is wrong, you bet the AOP line out and see.
-
Add the SessionFactory's get set method to your DaoIMPL class, and you can write a baseDAO to write the getset, and then inherit from this class.
-
There are no effective setter and getter methods.
This is very easy to implement, save this expression in the database, and of course read the configuration file every time it starts up (when the server starts). >>>More
1.Choose programmatic or declarative transaction management: Programmatic transaction management is often appropriate when you have only a few transaction operations. >>>More
The circumference of a circular playground track is 1,200 meters, and two students walk opposite each other at the same time and in the same place. >>>More
It's okay to fight at close range, but among the big powers, even if the United States comes, it will not have an absolute advantage, and if it is a long-distance attack on others, it will not work. >>>More
The number system is a scientific method for people to count using symbols. There are many types of number systems, and the number systems commonly used in computers are: decimal, binary, and hexadecimal. >>>More