(1) operate in eclipse
The above version of eclipse is:
(2) The following describes the relevant principles and the operation details for manually completing this goal:
We all know that a Java application project can be packaged into a jar. Of course, you must specify a main class with the main function as the program entry for your jar package.
The specific method is to modify the manifest. MF file under
Android Make jar package:To create a new Android project, then right click, click Export, select the export type of the jar file under Java, do not select the Androidmanifest.xml and res folder in Java file specification. Otherwise, the error generating final archive:found duplicate file for Apk:androidmanifes will appear when the jar package is called.If you cal
the user to choose to assemble their own jar packages, rather than having to introduce all of the Spring.jar's class files.Spring-core.jar (required)This jar file contains the basic core tool classes of the spring framework. The other components of Spring use the classes in this package, which is the basic core of the others, and of course you can use them in your own application system.Externally dependen
You can use the Bean's Init-method and Destroy-method properties to initialize and destroy the bean.Define a Hero class: Packagecom.moonlit.myspring; Public classHero { Public voidborn () {System.out.println ("The hero is born."); } Public voidDefaultborn () {System.out.println ("The hero is born by default."); } Public voiddoAction () {System.out.println ("The Hero Save the world."); } Public voiddead () {System.out.println ("The hero is dead."); } Public voidDefaultdead () {Sys
Exception in thread "Main" org. springframework. beans. factory. beandefinitionstoreexception: Line 5 in XML document from class path resource [applicationcontext. XML] is invalid; Nested exception is Org. XML. sax. saxparseexception: document root element "beans", must match doctype root "null ".
Beans. Factory. beandefinitionstoreexception is caused by
Check that the controller is not writing the same path ... Org.springframework.beans.factory.BeanCreationException:Error creating Bean with Name ' requestmappinghandlermapping ' defined inclassPath resource [Org/springframework/boot/autoconfigure/web/webmvcautoconfiguration$enablewebmvcconfiguration.class]: Invocation of Init method failed; Nested exception is java.lang.IllegalStateException:Ambiguous mapping. Cannot map ' Deliveryweb 'Method PublicJava.lang.Object Org.aodous.mall.toy.controller
I. Introduction of Beanfactory1.1. Bean:
In spring technology is component-based
The most basic is the most commonly used unit
In fact, the instance is stored in the spring container.
Beans are typically defined in a configuration file, Bean instantiation is managed by the spring IOC container, instances of beans can be accessed through beanfactory, and in fact most of the Java EE appl
warn:org.springframework.beans.factory.xml.xmlbeandefinitionreader#warning:ignored XML Validation Warning Org.xml.sax.SAXParseException; Linenumber:10; columnnumber:120; SCHEMA_REFERENCE.4: Unable to read the schema document ' Http://www.springframework.org/schema/beans/spring-beans-4.3.xsd ' for 1 because the document could not be found; 2 Unable to read the document; 3 The root element of the document is
There are three ways to define operations before the spring container initializes the bean and destroys it:First: Operations performed prior to initializing and destroying beans through @postconstruct and @PreDestroy methodsThe second is: by defining the Init-method and Destory-method methods in XMLThe third is the implementation of the Initializingbean and Disposablebean interfaces via beansThe following shows the @PostConstruct and @PreDestory1: Def
Spring Configures beans with annotationsConfiguring beans based on annotationsTo configure the Bean's properties based on annotationsScanning components in the ClasspathComponent scanning (component scanning): Spring is able to automatically scan, detect and instantiate components with specific annotations from the classpath.Specific components include the following:[Email protected]: basic annotations that
in class path resource [META-INF/cxf. XML]: instantiation of bean failed; Nested exception is Org. springframework. beans. beaninstantiationexception:Cocould not instantiate Bean class [Org. apache. cxf. wsdl11.wsdlmanagerimpl]: constructor threw exception; Nested exception is Java. lang. linkageerror: jaxb 2.0 API jar is being loaded (from jar: file:/D: /Works/
Objective:Lombok provides a simple form of annotations to help us simplify the removal of some of the necessary but bloated Java code. Especially with respect to POJOLombok Official Website: http://projectlombok.org/Official demo video teaches you how to use it quicklyBelow are the Lombok used under different toolsSimply say the usage in eclipse
1. Download Lombok.jar Package https://projectlombok.org/download.html
2. Run Lombok.jar: Java-jar D:
{ @SuppressWarnings("unused") TestBatch app =newTestBatch(); }catch(Exception ex){ ex.printStackTrace(); } } publicvoidTestBatch(){/** Do Something using the context **/}}
Output: Hello!How are you?
However, this process encountered some trouble. I checkedSystem library (added to the boot class path ),The following error occurs:
Is caused here:
Caused by: java. lang. NullPointerExceptionAt org. springframework.
One of the Json series beans To json (detailed explanation of the JSONObject class) and jsonjsonobject
Use json-lib-2.4-jdk15.jar, dependent Package 1) commons-lang-2.6.jar2) commons-beanutils-1.8.3.jar3) commons-collections-3.2.1.jar4) to json is relatively simple, basically use the following method: method 1 (commonly used) /*** Creates a JSONObject.
, Hibernate uses it to achieve HQL to SQL conversion template related operations need to package
Commons-collections-3.1.jar collections Apache tool class, Collection framework.
Javassist-3.9.0.GA.jar code generation tool, Hibernate uses it to extend Java class and implementation at runtime, the same as cglib package
Dom4j-1.6.1.jar dom4j xml Parser
Jta-1.1.jar s
Java programming every day with a lot of jar files, project development in the continuous guidance package, in the busy day of work, put down those complex business implementation, not only want to ask these jar package how to build, the jar package has what unique place and so on.Originally these commonly seen jar pac
Suppose there are n + 1 trees, n + 1 trees are buried less than m seeds, partition method C [n + M] [m]
The Lucas theorem is used to obtain the number of major groups in mod:
Lucas (n, m, p) = C [n % P] [M % P] × Lucas (N/P, M/P, P );
Saving beans
Time Limit: 6000/3000 MS (Java/others) memory limit: 32768/32768 K (Java/Others)Total submission (s): 2314 accepted submission (s): 845
Problem descriptionalthough winter is far away, squirrels have to wo
Users of QQ software to the detailed analysis to share the QQ method of gold beans.
Analytical sharing:
Login Super QQ Golden Beans area = Click on the left side of the page "immediately pick up" can. As shown in figure:
Get more Golden beans:
If you are through the mobile phone SMS opened Super QQ Gold level can receive 110 gold
This problem occurs when spring is started:
Exception in thread "Main" org. springframework. beans. factory. beancreationexception: Error creating bean with name 'helloworldbean' defined in file [C:/WL/spring04-08/src/applicationcontext. XML]: initialization of bean failed; Nested exception is Org. springframework. AOP. framework. aopconfigexception: Couldn't generate cglib subclass of class [class COM. spring. AOP. helloworld]: common causes of this
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.