|
9 | 9 | </parent> |
10 | 10 | <modelVersion>4.0.0</modelVersion> |
11 | 11 | <artifactId>crypto-spring</artifactId> |
12 | | - <packaging>war</packaging> |
| 12 | + <packaging>jar</packaging> |
13 | 13 | <name>Crypto Spring</name> |
14 | 14 |
|
15 | | - <description>Spring project using encrypted properties with Jasypt sample project. Requires a server like Apache |
16 | | - Tomcat or the Maven Tomcat7 plugin and a system property named APP_ENCRYPTION_PASSWORD (set automatically by |
17 | | - the Tomcat7 plugin). |
18 | | - |
19 | | - After launching, open the web application in your browser at http://localhost:8080/crypto-spring |
| 15 | + <description>Spring project using encrypted properties with Jasypt sample project. Start via the main method in the |
| 16 | + Application class. After launching, open the web application in your browser at http://localhost:8080. |
20 | 17 | </description> |
21 | 18 |
|
| 19 | + <properties> |
| 20 | + <start-class>de.dominikschadow.javasecurity.Application</start-class> |
| 21 | + </properties> |
| 22 | + |
22 | 23 | <dependencies> |
23 | 24 | <dependency> |
24 | | - <groupId>org.springframework</groupId> |
25 | | - <artifactId>spring-webmvc</artifactId> |
26 | | - </dependency> |
27 | | - <dependency> |
28 | | - <groupId>org.springframework</groupId> |
29 | | - <artifactId>spring-jdbc</artifactId> |
30 | | - </dependency> |
31 | | - <dependency> |
32 | | - <groupId>javax.servlet</groupId> |
33 | | - <artifactId>javax.servlet-api</artifactId> |
| 25 | + <groupId>org.springframework.boot</groupId> |
| 26 | + <artifactId>spring-boot-starter-thymeleaf</artifactId> |
34 | 27 | </dependency> |
35 | 28 | <dependency> |
36 | | - <groupId>javax.servlet.jsp</groupId> |
37 | | - <artifactId>javax.servlet.jsp-api</artifactId> |
| 29 | + <groupId>org.springframework.boot</groupId> |
| 30 | + <artifactId>spring-boot-starter-data-jpa</artifactId> |
38 | 31 | </dependency> |
39 | 32 | <dependency> |
40 | | - <groupId>javax.servlet</groupId> |
41 | | - <artifactId>jstl</artifactId> |
| 33 | + <groupId>org.webjars</groupId> |
| 34 | + <artifactId>bootstrap</artifactId> |
42 | 35 | </dependency> |
43 | 36 | <dependency> |
44 | | - <groupId>org.jasypt</groupId> |
45 | | - <artifactId>jasypt-spring31</artifactId> |
| 37 | + <groupId>org.webjars</groupId> |
| 38 | + <artifactId>webjars-locator</artifactId> |
46 | 39 | </dependency> |
47 | 40 | <dependency> |
48 | | - <groupId>commons-dbcp</groupId> |
49 | | - <artifactId>commons-dbcp</artifactId> |
| 41 | + <groupId>com.github.ulisesbocchio</groupId> |
| 42 | + <artifactId>jasypt-spring-boot-starter</artifactId> |
50 | 43 | </dependency> |
51 | 44 | <dependency> |
52 | 45 | <groupId>com.h2database</groupId> |
53 | 46 | <artifactId>h2</artifactId> |
54 | 47 | </dependency> |
55 | | - <dependency> |
56 | | - <groupId>org.slf4j</groupId> |
57 | | - <artifactId>slf4j-api</artifactId> |
58 | | - </dependency> |
59 | | - <dependency> |
60 | | - <groupId>org.slf4j</groupId> |
61 | | - <artifactId>slf4j-log4j12</artifactId> |
62 | | - </dependency> |
63 | 48 | </dependencies> |
64 | 49 |
|
65 | 50 | <build> |
66 | 51 | <finalName>${project.artifactId}</finalName> |
67 | | - <defaultGoal>tomcat7:run-war</defaultGoal> |
| 52 | + <defaultGoal>spring-boot:run</defaultGoal> |
68 | 53 | <plugins> |
69 | 54 | <plugin> |
70 | | - <groupId>org.apache.tomcat.maven</groupId> |
71 | | - <artifactId>tomcat7-maven-plugin</artifactId> |
| 55 | + <groupId>org.springframework.boot</groupId> |
| 56 | + <artifactId>spring-boot-maven-plugin</artifactId> |
| 57 | + <executions> |
| 58 | + <execution> |
| 59 | + <goals> |
| 60 | + <goal>build-info</goal> |
| 61 | + </goals> |
| 62 | + <configuration> |
| 63 | + <additionalProperties> |
| 64 | + <versions.spring-boot>${project.parent.parent.version}</versions.spring-boot> |
| 65 | + </additionalProperties> |
| 66 | + </configuration> |
| 67 | + </execution> |
| 68 | + </executions> |
| 69 | + </plugin> |
| 70 | + <plugin> |
| 71 | + <groupId>com.spotify</groupId> |
| 72 | + <artifactId>docker-maven-plugin</artifactId> |
72 | 73 | <configuration> |
73 | | - <systemProperties> |
74 | | - <APP_ENCRYPTION_PASSWORD>spring-jasypt</APP_ENCRYPTION_PASSWORD> |
75 | | - </systemProperties> |
| 74 | + <imageName>${docker.image.prefix}/${project.artifactId}</imageName> |
| 75 | + <dockerDirectory>src/main/docker</dockerDirectory> |
| 76 | + <resources> |
| 77 | + <resource> |
| 78 | + <targetPath>/</targetPath> |
| 79 | + <directory>${project.build.directory}</directory> |
| 80 | + <include>${project.build.finalName}.jar</include> |
| 81 | + </resource> |
| 82 | + </resources> |
76 | 83 | </configuration> |
77 | 84 | </plugin> |
78 | 85 | </plugins> |
|
0 commit comments