You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Visiting your application's `/hello` path at [http://localhost:5000/hello](http://localhost:5000/hello), you should see some great scientific conversions displayed:
@@ -379,7 +380,7 @@ At runtime, config vars are exposed to your app as environment variables. For ex
379
380
380
381
```java
381
382
:::-- sed -e '56,68d' src/main/java/com/example/Main.java
@@ -425,7 +426,9 @@ Deploy your updated application to Heroku to see this in action.
425
426
The `heroku run` command lets you run maintenance and administrative tasks on your app in a [one-off dyno](one-off-dynos). It can also lets you launch a REPL process attached to your local terminal for experimenting in your app's environment, or code that you deployed with your application:
426
427
427
428
```term
428
-
:::>> $ heroku run java -version
429
+
:::-- $ heroku run java -version
430
+
:::-- | grep -vq starting
431
+
:::-> | grep -vq connecting
429
432
```
430
433
431
434
If you receive an error, `Error connecting to process`, then you might need to [configure your firewall](one-off-dynos#timeout-awaiting-process).
@@ -496,45 +499,11 @@ The example app you deployed already has database functionality, which you can r
496
499
The code to access the database is straightforward. Here's the method to insert values into a table called `tick`:
497
500
498
501
```java
499
-
@Value("${spring.datasource.url}")
500
-
privateString dbUrl;
501
-
502
-
@Autowired
503
-
privateDataSource dataSource;
502
+
:::-- sed -e '45,49p' src/main/java/com/example/Main.java
:::-- sed -e '66,109p' src/main/java/com/example/Main.java
538
507
```
539
508
540
509
This ensures that when you access your app using the `/db` route, a new row is added to the `tick` table, and all rows are then returned so that they can be rendered in the output.
@@ -592,4 +561,4 @@ Here's some recommended reading to continue your Heroku journey:
592
561
593
562
*[How Heroku Works](how-heroku-works) provides a technical overview of the concepts you’ll encounter while writing, configuring, deploying, and running apps.
594
563
* The [Java category](/categories/java-support) provides more in-depth information on developing and deploying Java apps.
595
-
* The [Deployment category](/categories/deployment) provides a variety of powerful integrations and features to help streamline and simplify your deployments.
564
+
* The [Deployment category](/categories/deployment) provides a variety of powerful integrations and features to help streamline and simplify your deployments.
0 commit comments