Hello. There is a small training project on Spring Boot from the mysql database. I need to kill him for at least a month. But I have no idea how to do it. I kind of know how to buy a domain name (I just don’t know where), and where in the world to find a server for java.

applecation.properties spring.datasource.url = jdbc:mysql://localhost:3306/auth spring.datasource.username = root spring.datasource.password = testbd spring.jpa.show-sql = true spring.jpa.hibernate.ddl-auto = none spring.jpa.hibernate.naming-strategy = org.hibernate.cfg.ImprovedNamingStrategy spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5InnoDBDialect spring.jpa.properties.org.hibernate.envers.default_schema=app_audit 

pom.xml

 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.spring</groupId> <artifactId>auth</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>jar</packaging> <name>Restaurant</name> <description>Restaurant</description> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.5.2.RELEASE</version> <relativePath/> </parent> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <start-class>com.spring.AuthApplication</start-class> <java.version>1.8</java.version> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-validation</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <scope>runtime</scope> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> <version>3.5</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-envers</artifactId> <version>5.0.11.Final</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build> </project> 

enter image description here

2 answers 2

Use the free, for your needs, service heroku

  • Thank. Now I will start to fight with heroku) - Julius Shcherbak
  • There it is not difficult, there is a bunch of guides for configuration and use. Well, if you fail, please try to answer! - JVic
  • Damn yes there is sweat and tears). A bunch of guides and not all that is incomprehensible. What's the best way to keep trying? As jar or I tried a deploy branch with github, it seems to be compiled on the first login it crashes. I read but did not understand it, it seems like some kind of error pom.xml. I installed clearDB Mysql with the base, it seems like they gave the URL but I can’t understand how to put it in the configs) - Julius Scherbak
  • | @ YuliyScherbak Better it is, of course, with a gita, there is also some kind of config file specifically for heroku java $JAVA_OPTS -Dspring.profiles.active="heroku" -DTOPJAVA_ROOT="." -jar target/dependency/webapp-runner.jar --port $PORT target/*.war java $JAVA_OPTS -Dspring.profiles.active="heroku" -DTOPJAVA_ROOT="." -jar target/dependency/webapp-runner.jar --port $PORT target/*.war so it looks in my case. When it falls, what does it write in the logs? There are urls and credits; try first, just through the IDE connect, then pop into the configs - JVic
  • Miracle it started) But now it remains to rozobratsya base. Like in the configs, I entered the url correctly. but what about the tables? Indicate that the hibernate created them at the start and how to fill them? - Julius Scherbak

There are two good resources:

  1. archacloud.com
  2. herocu.com

I prefer option 1, as it was more profitable and easy to use. But you need to look for the taste of a friend)

  • 2
    If you give links to third-party resources, please check their performance! - JVic
  • I apologize for ochepyatki. - Igor Solntsev