role DiagramAfter analysis, the product role is analyzed to obtain
1.3.1.3 System DesignAfter analysis, the so-called gardeners are actually factory roles, while vegetables and fruits are product roles. The abstract factory model is used in the farm. The system design is as follows:
1.3.1.4 implementation source code1.3.1.4.1 Abstract Factory: gardener. javapackage com. lavasoft. patterns. abstractfactory. ybms ;/**
* Created by intellij idea.
* Fi
that can be used to turn off logging and use level all to enable logging for all messages. Logger The default level is info, and logs that are lower than info are not displayed. The default level definition for logger is under Lib in the JRE installation directory. # Limit The message that is printed on the console to INFO and above.Java.util.logging.ConsoleHandler.level = INFOThree, simple examplePublicStatic voidMain (string[] args) {Logger log = Logger.getlogger ("
Whether you are a novice or a veteran, in the program to read the resource files will always encounter some files can not find the problem, which is related to the implementation of Java bottom, can not calculate the bug, as long as the correct method, the problem can be solved. folder structure of the project: Repathtest├─src│└─com│└─lavasoft│├─test│└─res├─doc1. Using relative paths in the Java Development tools ProjectIn project, the root directory
that are lower than info are not displayed. The default level definition for logger is under Lib in the JRE installation directory. # Limit The message that is printed on the console to INFO and above.Java.util.logging.ConsoleHandler.level = INFOThree, simple example PublicclassTestlogger { PublicStaticvoidMain (string[] args) {Logger log = Logger.getlogger ("Lavasoft");Log.setlevel (Level.info);Logger log1 = Logger.getlogger ("
info are not displayed. The default level definition for logger is under Lib of the JRE installation directory. # LIMIT The message this are printed on the console to INFO and above.
Java.util.logging.ConsoleHandler.level = INFO Three, simple instance public class Testlogger {
public static void Main (string[] args) {
Logger log = Logger.getlogger ("Lavasoft");
Log.setlevel (Level.info);
Logger log1 = Logger.getlogger ("
for all messages. Logger The default level is info, and logs that are lower than info are not displayed. The default level definition for logger is under Lib in the JRE installation directory. # Limit The message that is printed on the console to INFO and above.Java.util.logging.ConsoleHandler.level = INFOThree, simple example PublicclassTestlogger { PublicStaticvoidMain (string[] args) {Logger log = Logger.getlogger ("Lavasoft");Log.setlevel (Level.
logs that are lower than info are not displayed. The default level definition for logger is under Lib in the JRE installation directory.# Limit The message that is printed on the console to INFO and above.java.util.logging.ConsoleHandler.level = INFOThird, simple example Public classTestlogger { Public Static voidMain (string[] args) {Logger log= Logger.getlogger ("Lavasoft"); Log.setlevel (Level.info); Logger Log1= Logger.getlogger (
of Mysql Data. In this way, there are two root users, one is the original system, and the other is newly created, for the convenience of management, delete the MySQL Root User and keep the created root user because the user can access MySQL through the network. Then, delete the user's command:User MySQL;Delete from user where user = 'root' and host = 'localhost'; commit; in fact, the above method is the authorization command, which creates a database user while authorizing. MySQL also has a sep
details, you can view the uer table of mysql Data. In this way, there are two root users, one is the original system, and the other is newly created, for the convenience of management, delete the mysql root User and keep the created root user because the user can access mysql through the network.
Then, delete the user's command:User mysql;Delete from user where user = root and host = localhost;Commit;
In fact, the above method is the authorization command, which creates a database user while au
First import the package, freemarker.jar:freemarker-2.3.18.tar.gzhttp://cdnetworks-kr-1.dl.sourceforge.net/project/freemarker/Freemarker/2.3.18/freemarker-2.3.18.tar.gz of course, if it is Maven project, can be downloaded from the warehouse, here do not repeat; 1. Create a Template object by string and perform interpolation processingImportFreemarker.template.Template;ImportJava.io.OutputStreamWriter;ImportJava.io.StringReader;ImportJava.util.HashMap;ImportJava.util.Map;/*** The simplest example
1. Create template objects by string, and perform interpolation processing
Import freemarker.template.Template;
Import Java.io.OutputStreamWriter;
Import Java.io.StringReader;
Import Java.util.HashMap;
Import Java.util.Map;
/**
* Freemarker The simplest example
* *
@author leizhimin 11-11-17 Morning 10:32 * * Public
class Test2 {
public static void Main (string[] args) throws exception{
//Create a Template object
Template t = new Template (NULL, new Stri
Freemarker The simplest example of a program
Freemarker-2.3.18.tar.gz
Http://cdnetworks-kr-1.dl.sourceforge.net/project/freemarker/freemarker/2.3.18/freemarker-2.3.18.tar.gz
Freemarker-2.3.13.jar:
Link: http://pan.baidu.com/s/1eQVl9Zk Password: izs5
1. Create template objects by string, and perform interpolation processing
After execution, the console outputs the results:
Import freemarker.template.Template;
Import Java.io.OutputStreamWriter;
Import Java.io.StringReader;
Imp
Whether you are a novice or a veteran, in the program to read the resource files will always encounter some files can not find the problem, which is related to the Java bottom of the implementation, not a bug, as long as the method is appropriate, the problem can be solved.
Folder structure for the project:
repathtest ├─src │ └─com │ └─lavasoft │ ├─test │ └─res ├─doc
1. Using relative paths in pro
management, will be MySQL with root delete, keep the root user just created,The reason is that this user can access MySQL over the network. Then, delete the user's command:Use MySQLDelete from user where user= ' root ' and host= ' localhost ';Commit In fact, the above method is to authorize the command, while authorizing the creation of the database user. MySQL also has a separate way to modify the user's password, see below how to operate. First, create a user
followed by localhost. For details, you can view the uer table of Mysql Data. In this way, there are two root users, one is the original system, and the other is newly created, for the convenience of management, delete the MySQL Root User and keep the created root user because the user can access MySQL through the network.
Then, delete the user's command:User MySQL;Delete from user where user = 'root' and host = 'localhost ';Commit;
In fact, the above method is the authorization command, which
locally or through the network. It is emphasized that the root user of the MySQL system can only access the database locally. Its @ character is followed by localhost. For details, you can view the uer table of Mysql Data. In this way, there are two root users, one is the original system, and the other is newly created, for the convenience of management, delete the MySQL Root User and keep the created root user because the user can access MySQL through the network.
Then, delete the user's comma
, and the other is newly created, for the convenience of management, delete the MySQL Root User and keep the created root user because the user can access MySQL through the network. Then, delete the user's command:
User MySQL;
Delete from user where user = 'root' and host = 'localhost'; commit; in fact, the above method is the authorization command, which creates a database user while authorizing. MySQL also has a separate way to change the user password. Let's take a look at how to perform 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.