How to configure the Oracle database in the appfuse Project

Source: Internet
Author: User

Appfuse is a tool for rapid development of Web application systems. It is a configured project, just waiting for you to put your ownCode.

However, appfuse supports MySQL by default. If you use an Oracle database, you need to make some modifications.

1) modify the bulid. properties File

Find this section:

# Database. Jar =$ {PostgreSQL. Jar}
# Database. type = PostgreSQL
# Database. Host = localhost
# Database URL for creating other databases (doesn't work with pgsql)
# Database. admin. url = JDBC :$ {database. Type}: // $ {database. Host}/template1
# Database. admin. Username = s
# Database. admin. Password = s

# Hibernate. dialect = org. hibernate. dialect. postgresqldialect
# Database. driver_class = org. PostgreSQL. Driver
# Database. url = JDBC :$ {database. Type}: // $ {database. Host}/$ {database. name}

Modify:

Database. Jar =$ {Lib. dir}/Oracle/ojdbc14.jar # store the jar package of the oracle JDBC driver and download it by yourself
Database. type = Oracle
Database. Host = localhost # your Oracle server address
Database. Sid = mysid # SID of Oracle
Database. schema = Scott
# Database URL for creating other databases (doesn't work with pgsql)
# Database. admin. url = JDBC :$ {database. Type}: // $ {database. Host}/template1
Database. Username = Scott
Database. Password = Tiger

Hibernate. dialect = org. hibernate. dialect. oracle9dialect
Database. driver_class = oracle. JDBC. Driver. oracledriver
Database. url = JDBC: oracle: thin :$ {database. Host}: 1521 :$ {database. Sid}

2) Modify bulid. xml

Find the task dbunit and change it
<Dbunit driver = "$ {database. driver_class}" schema = "$ {database. schema }"
Supportbatchstatement = "false" url = "$ {database. url }"
Userid = "$ {database. Username}" Password = "$ {database. Password}">

That's all

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.