Small Project with Spring boot + exposing services REST + SQLite + angularjs in client side. This project was built based in the next tutorial http://websystique.com/spring-boot/spring-boot-angularj
- Spring boot v1.5.8
- org.xerial/sqlite-jdbc 3.20.0
- springfox-swagger2 2.7.0
- springfox-swagger-ui 2.7.0
- Angularjs v1.5.8
- Angular-ui router 0.3.1
- ngstorage 0.3.10
- angular-bootstrap-datetimepicker
- angular-base64-upload
- Bootstrap 3.3.7
- Java 1.6
- Download zip or clone from github
git clone https://github.com/drog/patients.git
- Go to parent folder
- Create a executable jar
mvn package
- Start the application
java -jar target/restExternal-0.0.1-SNAPSHOT.jar
- The Application will start in http://localhost:7777
Aditionally you can run the application in Eclipse or IntelliJ IDEA running the class main RestExternalApplication
You can edit the configuration file in src\main\resources\application.properties
and change the port, security, whatever
app.name=Pacientes App
spring.profiles.active=dev
#comment above profile and uncoment line below to operate using https
#spring.profiles.active=https
#spring.mvc.view.prefix: /WEB-INF/jsp/
#spring.mvc.view.suffix: .jsp
server.port=7777
#server.context-path=/v1
spring.jpa.database-platform=com.diego.rest.restExternal.config.SQLiteDialect
#spring.jpa.hibernate.ddl-auto=create-drop
spring.jpa.hibernate.ddl-auto=create
spring.jpa.show-sql=false
spring.jpa.hibernate.naming-strategy=org.hibernate.cfg.EJB3NamingStrategy
management.security.enabled=true
logging.level.org.springframework.web=DEBUG
logging.level.org.hibernate=ERROR
Modify src/main/resources/static/js/app/app.js
line 5 URL_BASE = 'http://127.0.0.1:7777'
for the ip of the server
You can acces to http://localhost:7777/swagger-ui.html and see the documentation generated by Swagger
- https://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/
- http://blog.codeleak.pl/2014/10/spring-boot-actuator-custom-endpoint.html
- http://javasampleapproach.com/java-integration/integrate-angular-4-springboot-web-app-springtoolsuite
- http://www.baeldung.com/spring-boot-application-configuration
- http://www.baeldung.com/swagger-2-documentation-for-spring-rest-api
- https://www.mkyong.com/spring-boot/spring-boot-deploy-war-file-to-tomcat/