Commit 2a963f9 1 parent efd88f6 commit 2a963f9 Copy full SHA for 2a963f9
File tree 3 files changed +49
-0
lines changed
3 files changed +49
-0
lines changed Original file line number Diff line number Diff line change 72
72
</plugin >
73
73
</plugins >
74
74
</build >
75
+
76
+ <distributionManagement >
77
+ <site >
78
+ <id >default</id >
79
+ <url >file:///tmp/piranha/extension/datasource/</url >
80
+ </site >
81
+ </distributionManagement >
75
82
</project >
Original file line number Diff line number Diff line change
1
+ # Piranha DataSource Extension
2
+
3
+ The DataSource extension delivers you with a default DataSource in a Piranha runtime.
4
+
5
+ ## Override the default DataSource using web.xml
6
+
7
+ You override the default DataSource using the snippet below:
8
+
9
+ ``` xml
10
+ <data-source >
11
+ <name >java:comp/DefaultDataSource</name >
12
+ <class-name >my.CustomDataSource</class-name >
13
+ <url >jdbc:custom://localhost:3306/mydb</url >
14
+ <user >myuser</user >
15
+ <password >mypassword</password >
16
+ <property >
17
+ <name >myProperty</name >
18
+ <value >myValue</value >
19
+ </property >
20
+ </data-source >
21
+ ```
22
+
23
+ For runtimes that do not include the web.xml extension you will need to add it if you want
24
+ to override the default DataSource as described above. You can do this by adding the
25
+ following dependency to your pom.xml:
26
+
27
+ ``` xml
28
+ <dependency >
29
+ <groupId >cloud.piranha.extension</groupId >
30
+ <artifactId >piranha-extension-webxml</artifactId >
31
+ <version >${piranha.version}</version >
32
+ </dependency >
33
+ ```
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+
3
+ <project >
4
+ <body >
5
+ <menu name =" Overview" >
6
+ <item name =" Introduction" href =" index.html" />
7
+ </menu >
8
+ </body >
9
+ </project >
You can’t perform that action at this time.
0 commit comments