Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Detailed steps for CAS4.0 to connect to mysql database

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the detailed steps of CAS4.0 to connect to mysql database, the contents of the article are carefully selected and edited by the author, with a certain pertinence, the reference significance for everyone is still relatively great, the following with the author to understand the detailed steps of CAS4.0 to connect to mysql database.

The steps are as follows

One:

After adding dependencies in cas-4.0.0\ cas-server-webapp\ pom.xml (shown below), open cmd and run mvn clean package under the cas-4.0.0\ cas-server-webapp folder, and then deploy the cas.war package under cas-4.0.0\ cas-server-webapp\ target to tomcat

Xml code

Org.jasig.cas

Cas-server-support-jdbc

${project.version}

Jar

Commons-dbcp

Commons-dbcp

1.4

Mysql

Mysql-connector-java

5.1.6

Two:

Create a database locally, and create a new table cas_user, and create statements such as download

Sql code

Create table cas_user (

Id bigint not null auto_increment

Email varchar (255)

Username varchar (255) not null unique

Name varchar (255)

Password varchar (255)

Primary key (id)

) ENGINE=InnoDB

Three:

Configure the database related files, configure the corresponding datasource, database address, user name, password, and query user's sql in tomcat-for-cas\ webapps\ cas\ WEB-INF\ deployerConfigContext.xml. It is important to note that if you create your own table, replace the corresponding field name, database name, and don't forget to comment out the default username password configuration (casuser/Mellon). Download the following configuration to make a full copy

Xml code

download

download

Com.mysql.jdbc.Driver

Jdbc:mysql://localhost:3306/test

Root

123456

After reading the above detailed steps about CAS4.0 connecting to mysql database, many readers must have some understanding. If you need more industry knowledge and information, you can continue to follow our industry information column.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report