??xml version="1.0" encoding="utf-8" standalone="yes"?> Ant 脚本使用 SchemaSpy 工具来创?Javadoc 格式的文Ӟ 使用 q些 SchemaSpy 的命令行属性用于生成显C?ERD ?HTML 文g
通过l合使用多种工具、作为构建的一部分针对数据库执?ERD 生成脚本Qƈ调度 ERD 生成Q您可以在开发过E中L、快速地做出很多数据库决{?
另外Q对于喜Ƣmaven的同学,SchemaSpy 也提供了plugin
http://maven.wakaleo.com/mojo/maven-schemaspy-plugin/faq.html 我是?001q去沈阳M的,一直也是很喜欢沈阳的气候和东北人的豪爽Q东北爷们是真正可以拿心和你交朋友的Q不q我实在不喜Ƣ东北的饮食Q觉得不l腻Q另外南方还有我的女人在{我回去Q要女h来东北,隑ֺ不是一般的大,所以在扑ַ作的时候,我就下定军_一定要扑֍方的公司Q最好广州,深圳的,或者老家南昌的也是可以的。但是南方公司去东北招生的实在是,除了华ؓQ中兴之外真的是的可怜,管我们学校在沈阳也是数一C的学校?/p> ?4q在10月䆾Q我面试的第一家公司是东YQ没有办法,谁让我们学校是东软的最大股东尼Q不知道现在是不是)Q面试的q程也还不错Q考试题也做的很顺Q东软还提出我们下学期直接找一些外教来教我们日文,不过当时东Yl出的薪水实在是低的可怜,只有1800元,而且q要自己负责住宿Q自己当时也老大不小了,q有女h在读书,是不是也是需要买些礼物的Q而且沈阳和大q都不是我想ȝ地方Q结果就直接没有L道?/p> 接下来的日子也就整天在校内的招聘|站Q白山黑_上看帖子Q看C上vbmi的招聘广告,一看是上v的公司,而且做的是辽宁网通的目Q感觉项目很大,可以学到不少东西Q关键是上v的公司,目做完了就可以M发展呢Q而且当时x友也q在ȝI生Q仔l的x觉得q个公司q是比较适合自己Q于是也开始做准备Q接下来的事情都很顺利,W试Q面试,当时有资格参加面试的Q整个我们学校也?个hQ一个本U生Q一个研I生Q不q最后那个研I生也没有过厅R?/p> 在辽宁项目的前期q段旉Q估计也会我成长最快,也是最艰苦的时_我后l的会详l介l到。我W一天上班就是去做releaseQ也是做发布和部vQ在当时的项目中Q我们ƈ没有像一些公司还有项目配|员q个角色Q就是直接拉一个开发h员来负责做releaseQ这个角色当时是在项目中最辛苦的一个,l常是下?点开始,然后~译3-4个小Ӟ?0Ҏ可以~译完成Q比较顺利的情况下)Q如果遇到编译不q去的时候,q需要联pd发h员进行修改,~译之后在对照check listq行增量部v?/p> 在第一天上班,我就从上?0点过去,W?天凌?点半才下班,?Ҏ到学校宿舍睡觉,后箋?个月都是如此Q现在回惌v来,感觉当时真的是很辛苦Q不q那D|间也开始熟习了不少东西Q知道了Z模块开发,对antQweblogicQoracleQplsqlQlinuxQaix{的使用也开始非常熟习了。在q段旉里也开始熟习了公司的项目情况,开发h员,试人员?/p> 在maven中,我们可以在pom.xml增加Q?/p> <reporting> 使用javadoc:aggregate 可以生成出整个目按照package的uml图了?/p> 如果是用antQ在build.xml中增加target <target name="genuml"> 注意Q要正常使用 UMLGraphQ您必须先安?Graphviz 工具Q请自己google相关信息?/p><property name="reports.dir" value="${basedir}"/>
<java jar="schemaSpy_3.1.1.jar"
output="${reports.dir}/output.log"
error="${reports.dir}/error.log"
fork="true">
<arg line="-t mysql"/>
<arg line="-host localhost"/>
<arg line="-port 3306"/>
<arg line="-db brewery"/>
<arg line="-u root"/>
<arg line="-p sa"/>
<arg line="-cp mysql-connector-java-5.0.5-bin.jar"/>
<arg line="-o ${reports.dir}"/>
</java>
java
Ant d调用 SchemaSpyQ传递了很多属性:
-t
为数据库cdQ有效gؓ mysql
?code>ora?code>db2Q等{?
-host
为托数据库的计机名?
-port
为数据库 URL 的端口数?
-u
为数据库用户名?
-p
为数据库密码?
-cp
为类路径Q用于指C数据库驱动E序 JAR 文g的位|)?
-o
出目录的位置?/li>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.6.1</version>
<configuration>
<doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
<!-- <docletPath>/path/to/UmlGraph.jar</docletPath> -->
<docletArtifact>
<groupId>org.umlgraph</groupId>
<artifactId>doclet</artifactId>
<version>5.1</version>
</docletArtifact>
<additionalparam>-views</additionalparam>
<useStandardDocletOptions>true</useStandardDocletOptions>
</configuration>
</plugin>
</plugins>
</reporting>
<property name="uml.dir" value="${basedir}/uml"/>
<property name="src.uml.dir" value="${src.dir}/uml"/>
<mkdir dir="${uml.dir}"/>
<path id="uml.source.path">
<pathelement path="${src.uml.dir}/"/>
<pathelement path="${src.java.dir}"/>
</path>
<javadoc sourcepathref="uml.source.path" packagenames="*" package="true">
<doclet name="org.umlgraph.doclet.UmlGraph" path="${basedir}/lib/UmlGraph.jar">
<param name="-d" value="${uml.dir}"/>
</doclet>
</javadoc>
<apply executable="dot" dest="${uml.dir}" parallel="false">
<arg value="-Tpng"/>
<arg value="-o"/>
<targetfile/>
<srcfile/>
<fileset dir="${uml.dir}" includes="*.dot"/>
<mapper type="glob" from="*.dot" to="*.png"/>
</apply>
</target>
百支对于我来说是一ơ清z,z掉以前的恶习,z掉以前的老思维Q重新培L丢掉已久的hDQ重新找回往日的Ȁ情。来阉K之后Q也一直在想一个问题,阉K和我以前公司有什么不同?或者说有什么特别的之处Q其实这个问题有很简单,是阉K是一家有梦想的公司,一家有价D的公司,一家有亲情Q友情的公司Q一家工作生zM体的公司Q从中国来看Q阿里是唯一一家大的公司,而且价gp诏ȝq么好的公司Qonly one in china?/p>
百支培训了很多业务知识,传统U,虚拟U,兄弟U,安全U,资金U,…学C很多东西?/p>
百支的培训,让我开始结识了新的同学Q新的家人,新的伙伴Q让我们happly every dayQ?认真工作Q快乐生z!
在服务器pȝ出现问题Ӟ例如某个文g无法删除Q某个程序假L者是pȝ没有响应都可以按CTRL+SHIFT+ESCQ调出Windowsd理器。接下来扑ֈ“进E”标{,“explorer.exe”进E关闭。接下来整个桌面׃消失Q只剩下桌布了。然后通过Windowsd理器的“文件”菜单下的“新ZQ务(q行Q”打开“创建新d”窗口,通过“浏览”按钮找到要删除文g所在目录,在浏览窗口里直接删除卛_?9%都可以将q个固的文件删除,删除后l选择“文件”菜单下的“新ZQ务(q行Q”打开“创建新d”窗口,在打开处输入命?-explorer后回车,我们返回到正常的桌面界面下。显Ӟ对付固文gQ这个方法尤为简单?
When talking about the productized software, people often think of Microsoft Office and Microsoft XP. Of course the Microsoft product series is very successful. They can provide excellent GUI, and good user experience.
In China, there is a different picture for software products. Let me take Chinese software development companies for example. Most of the companies in China work on some projects, instead of specific products, When a company starts a new project, they need to invest lots of developers and money into the project. Sometimes, they also need to send a number of technicians to the customer site to do the development. In my opinion, there are two reasons.
(1) The software is not very satisfactory enough to be a perfect product.
(2) Chinese customers have lots of special requirements.
Customer is GOD. We can not change the ideas of customer most of time. So, we need to improve our product. Then how to evaluate a software product's success? Because of various concerns, different users hold different opinions and will arrive at different conclusions.
As for redevelopment and customization, the following should be more concerned:
(1) Software scaffolding
If the product provides scaffolding, the redevelopment people will quickly generate code (from database, UML, etc?). As we know, the Spring, Hibernate also provide some scaffolding.
(2) Easy installation package
Most of time, the installation gives the first impression to the customer. So it is very important.
A simple installation must ensure everyone, even someone not very familiar with the application, can install the software.
The installation log file also plays significant role. Sometimes, it’s possible for the customer’s environment to have some problem so that the installation runs unsuccessfully. In this situation, the customer can send the log file to the technicians for analysis.
People who do not know about your product also can install easily according to wizard.
(3) Lots of Examples
The examples are the best teacher. Why most of java developer favor apache ant? The reason is that apache ant can provide lots of examples; you can find any task example in apache ant web site.
Example not only provides assistance to the development but also the product redevelopment If your product provides lost of examples, the questions from customers will be reduced substantially.
(4) Online documentation
If the developer can find some on-line document, he will not worry about that the document in his hands is an old version. And of course, the product developer also can work more effectively. For example, if the document has some error, or need to be modified, he can fix it quickly.
(5) Very good support
If the customer has some problem when he use or customize, he can get easily the support.
As for end-users, the following is very important.
(1) Friendly GUI, operator easily
(2) Collection client information online active, when some error happen.
(3) Auto-update to new version.
For customer, he does not need install some patch.
(4) In a conspicuous place clearly marked version of the software, and contact method
As for a kernel developer, he might think we need to provide:
(1) OSGI framework or plug-in framework to facilitate the expansion
(2) Standard software delivery process
(3) Software quality control
(4) A very good suite of documents.
Example A.8. Repository Configuration in settings.xml
<settings xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> ... <profiles> <profile> ... <repositories> <repository> <id>codehausSnapshots</id> <name>Codehaus Snapshots</name> <releases> <enabled>false</enabled> <updatePolicy>always</updatePolicy> <checksumPolicy>warn</checksumPolicy> </releases> <snapshots> <enabled>true</enabled> <updatePolicy>never</updatePolicy> <checksumPolicy>fail</checksumPolicy> </snapshots> <url>http://snapshots.maven.codehaus.org/maven2</url> <layout>default</layout> </repository> </repositories> <pluginRepositories> ... </pluginRepositories> ... </profile> </profiles> ... </settings>
These are the policies for each type of artifact, Release or snapshot. With these two sets, a POM has the power to alter the policies for each type independent of the other within a single repository. For example, one may decide to enable only snapshot downloads, possibly for development purposes.
true
or false
for whether this repository is enabled for the respective type (releases or snapshots).
This element specifies how often updates should attempt to occur. Maven will compare the local POMs timestamp to the remote. The choices are: always
, daily
(default), interval:X
(where X is an integer in minutes) or never
.
When Maven deploys files to the repository, it also deploys corresponding checksum files. Your options are to ignore
, fail
, or warn
on missing or incorrect checksums.
In the above description of repositories, it was mentioned that they all follow a common layout. This is mostly correct. Maven 2 has a default layout for its repositories; however, Maven 1.x had a different layout. Use this element to specify which if it is default or legacy. If you are upgrading from Maven 1 to Maven 2, and you want to use the same repository which was used in your Maven 1 build, list the layout as legacy
(1)proguard
(2)yguard
the proguard support ant, maven. I use maven as the project and build tools. so I want use the maven proguard plugin, but It is not easy to use. so I use yguard.
in your pom.xml, you can add:
<plugin>
<groupId>net.sf.mgp</groupId>
<artifactId>maven-unclasses-plugin</artifactId>
<version>0.0.2</version>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<dependencies>
<dependency>
<groupId>yguard</groupId>
<artifactId>yguard</artifactId>
<version>2.3.0</version>
<scope>system</scope>
<systemPath>lib/yguard.jar</systemPath>
</dependency>
</dependencies>
<executions>
<execution>
<phase>package</phase>
<configuration>
<tasks>
<property refid="maven.compile.classpath"
name="mvn.classpath"></property>
<!-- <echo message="Using Maven Classpath: ${mvn.classpath}" /> -->
<taskdef name="yguard"
classname="com.yworks.yguard.YGuardTask"/>
<yguard>
<!-- Input file and output file is the same. -->
<inoutpair
in="${project.build.directory}/${project.build.finalName}.${project.packaging}"
out="${project.build.directory}/${project.build.finalName}.jar"/>
<!-- Obfuscate classes plus string references. -->
<rename
logfile="${project.build.directory}/yguard.log.xml"
replaceClassNameStrings="true">
<!-- Keep the only class to be used for easy running and its public method main(). -->
<keep>
<class classes="public" methods="public">
<patternset>
<include name=”xx.xxx.xxx.util.ConnectionUtil"/>
</patternset>
</class>
</keep>
</rename>
<!-- There are some external libraries used - Maven knows details. -->
<externalclasses>
<pathelement path="${mvn.classpath}"/>
</externalclasses>
</yguard>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
It is very cool!!!.
http://www.javaeye.com/topic/6417?page=1.
q个问题在jdk1.6已经不存?/p>
public static final void clearCache()
ResourceBundle.Control.getTimeToLive(String,Locale)
public static final void clearCache(ClassLoader loader)
loader
- the class loader
NullPointerException
- if loader
is null
ResourceBundle.Control.getTimeToLive(String,Locale)
?.5Q?.4怎么办呢Q?/p>
Class klass = ResourceBundle.getBundle("your.Bundle").getClass().getSuperclass();
Field field = klass.getDeclaredField("cacheList");
field.setAccessible(true);
sun.misc.SoftCache cache = (sun.misc.SoftCache)field.get(null);
cache.clear();
field.setAccessible(false);
q样可以清楚cache.