Skip to content
This repository has been archived by the owner on Nov 12, 2019. It is now read-only.

Commit

Permalink
Release candidate 1.4 (#31)
Browse files Browse the repository at this point in the history
* Increase version

* Log unrecognized exceptions

* Add liquibase support (#18)

* Add default liquibase implementation

* remove db scripts and add liquibase script

* format liquibase script

* Refactor authentication (#19)

* Throw exception if username or password is invalid

* Remove exception throwing from service

* Add error message

* Format UI code

* Add liquibase data (#21)

* Fix liquibase script

* Move to spring boot (#22)

* Created modules and add gulp task

* Update gitignore

* Add package.json file

* Fix build script

* Add static resources to final jar

* Remove invalid cors mapping

* Some fixes

* Some fixes

* Add meta info

* Fixes

* Fixes

* Fixes for spring boot startup

* Add readme (#24)

* Create README.md

* Fix readme

* Auth with spring security (#25)

* Fixes for spring security

* Fix authentication

* Add secured annotation and retrieve current user info

* Add actuator role

* Fix credentials cache (#26)

* Fix credentials cache

* Add readme about credentials cache flag

* Remove devtools dependency from prod profile

* Refactored code a little

* Encode passwords with passwordencoder

* Add logback (#27)

* Refactor ui features (#28)

* Use ngInject instead of hardcoded injection

* Add validation annotations and several fixes

* Remove validator class

* Use modal to add recipients

* DTO fixes

* Remove temp files

* Fix logout

* Several fixes

* Add existing persons to new group (#29)

* Several UI fixes

* Encode old password while changing

* Fix README.MD

* Tech/add tests (#30)

* Add unit tests for recipient controller

* Add tests

* Fix paths

* Fix change password bug

* Increase node version

* Update password hash

* Fix cache bugs

* Fix several bugs

* Increase release version

* Icon fixes
  • Loading branch information
pavel-luhin authored Jun 28, 2018
1 parent 761acc6 commit aef0829
Show file tree
Hide file tree
Showing 428 changed files with 6,892 additions and 6,344 deletions.
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
.idea
/target/
*.iml
*.iml
.tmp
node_modules
package-lock.json
node
npm-debug.log
confs.txt
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# RFE Sms Server
RFE Sms Server - is a simple application that provides api to send sms notifications. The main difference between this and other existing applications is that this one were created especially for Belarusian State University projects, such as https://cv.bsu.by and other internal ones. Under the hood this application using http://websms.by service.
This application contains users management system, ability to send sms directly from server or from external applications, collecting statistics of sent sms, duplicating sms messages to email.

# Getting Started
To start application you need to get Git, JRE that provides Java 8, Apache Maven at least 3.2 version, and MySQL at least 5.6 version.
First, you need to clone this repository.
```
git clone [email protected]:p-luhin/rfe-sms-server.git
```
Then you have to step into the cloned directory and specify branch you want to deploy. The latest stable version will always be in master branch that is active by default, but you can specify any branch you want.
Then you have to build application in jar file. To do this you need from project directory specify the following command
```
mvn clean install -Pprod
```
This will compile and pack all project files in jar file.
The project contains two profiles: ```prod``` and ```local```. The main difference is that production profile sends requests directly to websms server, and local one returns random or predefined data.
Next you have to create database schema and user for it.
```
CREATE DATABASE sms_server;
CREATE USER 'sms-server-user'@'localhost' IDENTIFIED BY 'some-password';
GRANT ALL ON sms_server.* TO 'sms-server-user'@'localhost';
FLUSH PRIVILEGES;
```
This set of mysql commands will create database schema, user and grant all access to created user.
Then you need to specify the following environment variables for the application:
* ```-Dspring.datasource.url``` or ```-Ddatabase.url``` in older version - url of database schema. In this example ```jdbc:mysql://localhost:3306/sms_server```
* ```-Dspring.datasource.username``` or ```-Ddatabase.username``` in older version - username of database user. In this example ```sms-server-user```
* ```-DDspring.datasource.password``` or ```-Ddatabase.password``` in older version - password of database user. In this example ```some-password```
* ```-Dsms.test``` - in older versions test flag, send real or mock request to websms system. Deprecated. Use build profiles instead.
* ```-Dserver.url``` - server domain or IP address with port where application is going to be deployed. Needed to send in email to newly registered users.
* ```-Dcredentials.cache.enabled``` - in older versions flat to enable or disable credentials cache. Deprecated since version 1.4. Credentials cache is active by default now.
* ```-Dserver.port``` - specifies port to bind to server. 8080 is by default

After installing, you have execute jar file named ```sms-server-X.jar```, where X - application version from ```target``` folder.

To start application you need to execute ```java -jar sms-server-X.jar``` where ```sms-server-X.jar``` - is the name of the generated jar file.
After running this command, you can access sms server on ```http://localhost:8080```
318 changes: 62 additions & 256 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,269 +6,75 @@

<groupId>by.bsu.rfe</groupId>
<artifactId>sms-server</artifactId>
<version>1.3.7</version>
<version>1.4</version>

<packaging>war</packaging>
<issueManagement>
<url>https://github.com/p-luhin/rfe-sms-server/issues</url>
</issueManagement>

<developers>
<developer>
<name>Pavel Luhin</name>
<email>[email protected]</email>
</developer>
</developers>

<packaging>pom</packaging>

<modules>
<module>sms-server-frontend</module>
<module>sms-server-api</module>
</modules>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.10.RELEASE</version>
</parent>

<properties>
<java.version>1.8</java.version>
<spring.security.version>4.2.3.RELEASE</spring.security.version>
<spring.data.version>1.11.9.RELEASE</spring.data.version>
<spring.version>4.3.13.RELEASE</spring.version>
<apache.dbcp.version>1.4</apache.dbcp.version>
<hibernate.version>4.3.9.Final</hibernate.version>
<slf4j.version>1.7.12</slf4j.version>
<jackson.version>2.5.2</jackson.version>
<javax.mail.version>1.5.4</javax.mail.version>
<apache.httpclient.version>4.5</apache.httpclient.version>
<apache.io.version>2.4</apache.io.version>
<mysql.connector.verion>5.1.37</mysql.connector.verion>
<commons-lang3.version>3.4</commons-lang3.version>
<dozer.version>5.5.1</dozer.version>
<javax.servlet.version>4.0.0-b01</javax.servlet.version>
<quartz.version>2.2.3</quartz.version>
<apache.collections.version>4.1</apache.collections.version>
<apache.poi.version>3.14</apache.poi.version>
<apache.fileupload.version>1.2.1</apache.fileupload.version>
<lombok.version>1.16.20</lombok.version>
<hibernate.validator.version>6.0.7.Final</hibernate.validator.version>
<apache-poi.version>3.14</apache-poi.version>
<apache-commons-collections.version>4.1</apache-commons-collections.version>
<commons-fileupload.version>1.3.3</commons-fileupload.version>
</properties>

<dependencies>
<!-- https://mvnrepository.com/artifact/org.hibernate.validator/hibernate-validator -->
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<version>${hibernate.validator.version}</version>
</dependency>


<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>${hibernate.version}</version>
</dependency>

<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>${apache.dbcp.version}</version>
</dependency>

<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
<version>${spring.data.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>${spring.version}</version>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
</dependency>

<!-- Jackson libs work with JSON-->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson.version}</version>
</dependency>

<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>${apache.httpclient.version}</version>
</dependency>

<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${apache.io.version}</version>
</dependency>

<dependency>
<groupId>javax.mail</groupId>
<artifactId>javax.mail-api</artifactId>
<version>${javax.mail.version}</version>
</dependency>
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
<version>${javax.mail.version}</version>
</dependency>

<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql.connector.verion}</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
<version>${spring.version}</version>
</dependency>

<dependency>
<groupId>net.sf.dozer</groupId>
<artifactId>dozer</artifactId>
<version>${dozer.version}</version>
</dependency>

<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>${spring.security.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>${spring.security.version}</version>
</dependency>

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>${javax.servlet.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.quartz-scheduler</groupId>
<artifactId>quartz</artifactId>
<version>${quartz.version}</version>
</dependency>
<dependency>
<groupId>org.quartz-scheduler</groupId>
<artifactId>quartz-jobs</artifactId>
<version>${quartz.version}</version>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<version>${apache.collections.version}</version>
</dependency>

<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>${apache.poi.version}</version>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>${apache.fileupload.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</dependency>
</dependencies>

<profiles>
<profile>
<id>local</id>
<properties>
<spring.profiles.active>local</spring.profiles.active>
</properties>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
<profile>
<id>prod</id>
<properties>
<spring.profiles.active>prod</spring.profiles.active>
</properties>
</profile>
</profiles>

<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<version>${apache-commons-collections.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons-lang3.version}</version>
</dependency>
<dependency>
<groupId>net.sf.dozer</groupId>
<artifactId>dozer</artifactId>
<version>${dozer.version}</version>
</dependency>
<dependency>
<groupId>org.quartz-scheduler</groupId>
<artifactId>quartz</artifactId>
<version>${quartz.version}</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>${apache-poi.version}</version>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>${commons-fileupload.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>2.1.9</version>
<executions>
<execution>
<goals>
<goal>revision</goal>
</goals>
</execution>
</executions>
<configuration>
<dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
<generateGitPropertiesFile>true</generateGitPropertiesFile>
<generateGitPropertiesFilename>../../${project.build.outputDirectory}/version.properties
</generateGitPropertiesFilename>
<gitDescribe>
<abbrev>6</abbrev>
</gitDescribe>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</build>
</project>
Loading

0 comments on commit aef0829

Please sign in to comment.