Giter Site home page Giter Site logo

kanban-board-hack's Introduction

kanban-board-hack

This file contains a JavaScript script that can be used to create a GitHub Actions workflow script that will create and populate a Kanban board with issues (all in the todo column).

To run it, use:

node kanban.mjs issues "My Project" > .github/workflows/temp01.yml

Where My Project is the name of your Project Board.

It will look in the ./issues directory, and for each .md file found, it output code to create the issue, and add it to the todo column on the indicated Kanban board.

kanban-board-hack's People

Contributors

andrewhlu avatar pconrad avatar

Watchers

 avatar  avatar

Forkers

ucsb-cs156-w22

kanban-board-hack's Issues

Create database table for CollegiateSubreddits

Create database table for CollegiateSubreddits

Acceptance Criteria:

  • There is an @Entity class called CollegeSubreddit.java
  • There is a @Repository class called CollegeSubredditRepository.java
  • When you start up the repo on localhost, you can see the table
    using the H2 console (see the file docs/h2-database.md for
    instructions.)
  • When you deploy the app to Heroku, you can see the table
    using the psql command (See Accessing Database Console in the
    main README.md file for instructions.)

Details: @Entity class

The @Entity class should be similar to the file Todo.java
in the example repo https://github.com/ucsb-cs156-w22/demo-spring-react-example-v2.

You may also want to consult User.java in the same repo for another example.

Your file will be called CollegiateSubreddit.java and should be placed
in the entities subdirectory of the repo.

It will have a field for id, which should be defined like this:

  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private long id;

And fields for name,location, and subreddit, each of which should be strings, like this:

  private String name;
  private String location;
  private String subreddit;

Also note that the line:

@Entity(name = "todos")

should be replaced with this, since Spring Boot requires CamelCase while SQL requires snake_case:

@Entity(name = "collegiate_subreddits")

The rest, you should be able to figure out on your own.

The main difference is that you do NOT need the following in front of
any of your attributes.

@ManyToOne
@JoinColumn(name = "user_id")

This preceeds the attribute:

  private User user;

which is how we indicate that a particular record belongs to a particular User. We aren't doing that in the case of the records in the CollegeSubreddit table, though it is a common pattern in many
applications.

Details: @Repository class

For the repository class, see the example TodoRepository.java.

You may also consult UserRepository.java in the same repo for another example.

Looking at the sample code, let's figure out what needs to be changed:

@Repository
public interface TodoRepository extends CrudRepository<Todo, Long> {
  Iterable<Todo> findAllByUserId(Long user_id);
}
  1. You'll need to change the name TodoRepository to CollegiateSubredditRepository

  2. You'll need to change Todo to CollegiateSubreddit. This Todo refers back to the @Entity class for a single row in the database.

  3. You'll need to replace the method:

    Iterable<Todo> findAllByUserId(Long user_id);
    

    With these:

    Iterable<CollegiateSubredddit> findByName(String name);
    Iterable<CollegiateSubredddit> findBySubreddit(String subreddit);
    

    Note that one of the suprising things about Spring Boot is that
    you do not need to write code for these methods. Instead, the
    part of the Spring Boot framework known as Spring Data JDBC
    looks at the name you choose for these methods
    and based on that, it writes them for you.

    The rules for translating method naming conventions into
    generated code are complicated: we will not go over all of them in lecture, and you are not expected to memorize or learn them all.
    Instead, you need to be able to find what you need, when you need it.

    Some documentation is here to help get you started: https://docs.spring.io/spring-data/jdbc/docs/current/reference/html/#jdbc.query-methods

    While in this case, we are telling you what methods to add,
    in future cases, you'll be expected to figure out from context
    what kinds of lookup methods you might need for a table, consult
    the Spring Data

Create database table for CollegiateSubreddits

Create database table for CollegiateSubreddits

Acceptance Criteria:

  • There is an @Entity class called CollegeSubreddit.java
  • There is a @Repository class called CollegeSubredditRepository.java
  • When you start up the repo on localhost, you can see the table
    using the H2 console (see the file docs/h2-database.md for
    instructions.)
  • When you deploy the app to Heroku, you can see the table
    using the psql command (See Accessing Database Console in the
    main README.md file for instructions.)

Details: @Entity class

The @Entity class should be similar to the file Todo.java
in the example repo https://github.com/ucsb-cs156-w22/demo-spring-react-example-v2.

You may also want to consult User.java in the same repo for another example.

Your file will be called CollegiateSubreddit.java and should be placed
in the entities subdirectory of the repo.

It will have a field for id, which should be defined like this:

  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private long id;

And fields for name,location, and subreddit, each of which should be strings, like this:

  private String name;
  private String location;
  private String subreddit;

Also note that the line:

@Entity(name = "todos")

should be replaced with this, since Spring Boot requires CamelCase while SQL requires snake_case:

@Entity(name = "collegiate_subreddits")

The rest, you should be able to figure out on your own.

The main difference is that you do NOT need the following in front of
any of your attributes.

@ManyToOne
@JoinColumn(name = "user_id")

This preceeds the attribute:

  private User user;

which is how we indicate that a particular record belongs to a particular User. We aren't doing that in the case of the records in the CollegeSubreddit table, though it is a common pattern in many
applications.

Details: @Repository class

For the repository class, see the example TodoRepository.java.

You may also consult UserRepository.java in the same repo for another example.

Looking at the sample code, let's figure out what needs to be changed:

@Repository
public interface TodoRepository extends CrudRepository<Todo, Long> {
  Iterable<Todo> findAllByUserId(Long user_id);
}
  1. You'll need to change the name TodoRepository to CollegiateSubredditRepository

  2. You'll need to change Todo to CollegiateSubreddit. This Todo refers back to the @Entity class for a single row in the database.

  3. You'll need to replace the method:

    Iterable<Todo> findAllByUserId(Long user_id);
    

    With these:

    Iterable<CollegiateSubredddit> findByName(String name);
    Iterable<CollegiateSubredddit> findBySubreddit(String subreddit);
    

    Note that one of the suprising things about Spring Boot is that
    you do not need to write code for these methods. Instead, the
    part of the Spring Boot framework known as Spring Data JDBC
    looks at the name you choose for these methods
    and based on that, it writes them for you.

    The rules for translating method naming conventions into
    generated code are complicated: we will not go over all of them in lecture, and you are not expected to memorize or learn them all.
    Instead, you need to be able to find what you need, when you need it.

    Some documentation is here to help get you started: https://docs.spring.io/spring-data/jdbc/docs/current/reference/html/#jdbc.query-methods

    While in this case, we are telling you what methods to add,
    in future cases, you'll be expected to figure out from context
    what kinds of lookup methods you might need for a table, consult
    the Spring Data

Create `CollegiateSubredditController`, add `GET` (index) and `POST` (create)

Create CollegiateSubredditController, add GET (index) and POST (create)

Acceptance Criteria:

  • There is a controller file CollegiateSubredditController.java
    in the expected directory.
  • In CollegiateSubredditController.java there is
    code for a GET /api/collegiateSubreddits/all endpoint
    that returns a JSON list of all subreddits in the database.
    (We sometimes call this an index action since it lists all
    items in the database.)
  • In CollegiateSubredditController.java there is
    code for a POST /api/collegiateSubreddits/post endpoint
    that can be used to create a new entry in the table. (This
    is a create action.)
  • The Swagger-UI endpoints for these are well documented so that
    any member of the team can understand what they are for and
    how to use them.
  • The POST endpoint works as expected, in the sense that new
    records can be added to the database (on localhost).
  • The GET endpoint works as expected, in the sense that the new
    records that are added show up (on localhost).
  • The GET and POST endpoints work as expected when the
    app is deployed to Heroku.
  • There is full test coverage (Jacoco) for the methods in
    CollegiateSubredditController.java
  • There is full mutation test coverage (Pitest) for the methods in
    CollegiateSubredditController.java

Details

Consult the methods in TodosController.java for examples
of controller methods.

Consult the tests in TodosControllerTests.java for examples
of controller tests.

Create database table for CollegiateSubreddits

Create database table for CollegiateSubreddits

Acceptance Criteria:

  • There is an @Entity class called CollegeSubreddit.java
  • There is a @Repository class called CollegeSubredditRepository.java
  • When you start up the repo on localhost, you can see the table
    using the H2 console (see the file docs/h2-database.md for
    instructions.)
  • When you deploy the app to Heroku, you can see the table
    using the psql command (See Accessing Database Console in the
    main README.md file for instructions.)

Details: @Entity class

The @Entity class should be similar to the file Todo.java
in the example repo https://github.com/ucsb-cs156-w22/demo-spring-react-example-v2.

You may also want to consult User.java in the same repo for another example.

Your file will be called CollegiateSubreddit.java and should be placed
in the entities subdirectory of the repo.

It will have a field for id, which should be defined like this:

  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private long id;

And fields for name,location, and subreddit, each of which should be strings, like this:

  private String name;
  private String location;
  private String subreddit;

Also note that the line:

@Entity(name = "todos")

should be replaced with this, since Spring Boot requires CamelCase while SQL requires snake_case:

@Entity(name = "collegiate_subreddits")

The rest, you should be able to figure out on your own.

The main difference is that you do NOT need the following in front of
any of your attributes.

@ManyToOne
@JoinColumn(name = "user_id")

This preceeds the attribute:

  private User user;

which is how we indicate that a particular record belongs to a particular User. We aren't doing that in the case of the records in the CollegeSubreddit table, though it is a common pattern in many
applications.

Details: @Repository class

For the repository class, see the example TodoRepository.java.

You may also consult UserRepository.java in the same repo for another example.

Looking at the sample code, let's figure out what needs to be changed:

@Repository
public interface TodoRepository extends CrudRepository<Todo, Long> {
  Iterable<Todo> findAllByUserId(Long user_id);
}
  1. You'll need to change the name TodoRepository to CollegiateSubredditRepository

  2. You'll need to change Todo to CollegiateSubreddit. This Todo refers back to the @Entity class for a single row in the database.

  3. You'll need to replace the method:

    Iterable<Todo> findAllByUserId(Long user_id);
    

    With these:

    Iterable<CollegiateSubredddit> findByName(String name);
    Iterable<CollegiateSubredddit> findBySubreddit(String subreddit);
    

    Note that one of the suprising things about Spring Boot is that
    you do not need to write code for these methods. Instead, the
    part of the Spring Boot framework known as Spring Data JDBC
    looks at the name you choose for these methods
    and based on that, it writes them for you.

    The rules for translating method naming conventions into
    generated code are complicated: we will not go over all of them in lecture, and you are not expected to memorize or learn them all.
    Instead, you need to be able to find what you need, when you need it.

    Some documentation is here to help get you started: https://docs.spring.io/spring-data/jdbc/docs/current/reference/html/#jdbc.query-methods

    While in this case, we are telling you what methods to add,
    in future cases, you'll be expected to figure out from context
    what kinds of lookup methods you might need for a table, consult
    the Spring Data

Set up a team deployments for prod and qa on Heroku

Set up a team deployments for prod and qa on Heroku

Acceptance Criteria:

Set up a team deployments for prod and qa on Heroku

Set up a team deployments for prod and qa on Heroku

Acceptance Criteria:

Create database table for CollegiateSubreddits

Create database table for CollegiateSubreddits

Acceptance Criteria:

  • There is an @Entity class called CollegeSubreddit.java
  • There is a @Repository class called CollegeSubredditRepository.java
  • When you start up the repo on localhost, you can see the table
    using the H2 console (see the file docs/h2-database.md for
    instructions.)
  • When you deploy the app to Heroku, you can see the table
    using the psql command (See Accessing Database Console in the
    main README.md file for instructions.)

Details: @Entity class

The @Entity class should be similar to the file Todo.java
in the example repo https://github.com/ucsb-cs156-w22/demo-spring-react-example-v2.

You may also want to consult User.java in the same repo for another example.

Your file will be called CollegiateSubreddit.java and should be placed
in the entities subdirectory of the repo.

It will have a field for id, which should be defined like this:

  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private long id;

And fields for name,location, and subreddit, each of which should be strings, like this:

  private String name;
  private String location;
  private String subreddit;

Also note that the line:

@Entity(name = "todos")

should be replaced with this, since Spring Boot requires CamelCase while SQL requires snake_case:

@Entity(name = "collegiate_subreddits")

The rest, you should be able to figure out on your own.

The main difference is that you do NOT need the following in front of
any of your attributes.

@ManyToOne
@JoinColumn(name = "user_id")

This preceeds the attribute:

  private User user;

which is how we indicate that a particular record belongs to a particular User. We aren't doing that in the case of the records in the CollegeSubreddit table, though it is a common pattern in many
applications.

Details: @Repository class

For the repository class, see the example TodoRepository.java.

You may also consult UserRepository.java in the same repo for another example.

Looking at the sample code, let's figure out what needs to be changed:

@Repository
public interface TodoRepository extends CrudRepository<Todo, Long> {
  Iterable<Todo> findAllByUserId(Long user_id);
}
  1. You'll need to change the name TodoRepository to CollegiateSubredditRepository

  2. You'll need to change Todo to CollegiateSubreddit. This Todo refers back to the @Entity class for a single row in the database.

  3. You'll need to replace the method:

    Iterable<Todo> findAllByUserId(Long user_id);
    

    With these:

    Iterable<CollegiateSubredddit> findByName(String name);
    Iterable<CollegiateSubredddit> findBySubreddit(String subreddit);
    

    Note that one of the suprising things about Spring Boot is that
    you do not need to write code for these methods. Instead, the
    part of the Spring Boot framework known as Spring Data JDBC
    looks at the name you choose for these methods
    and based on that, it writes them for you.

    The rules for translating method naming conventions into
    generated code are complicated: we will not go over all of them in lecture, and you are not expected to memorize or learn them all.
    Instead, you need to be able to find what you need, when you need it.

    Some documentation is here to help get you started: https://docs.spring.io/spring-data/jdbc/docs/current/reference/html/#jdbc.query-methods

    While in this case, we are telling you what methods to add,
    in future cases, you'll be expected to figure out from context
    what kinds of lookup methods you might need for a table, consult
    the Spring Data

Set up codecov token and codecov badge.

Set up codecov token and codecov badge.

Acceptance criteria

  • The repo is enabled on codecov on the main branch.
  • The CODECOV_TOKEN for the repo is uploaded to the Secrets->Actions->Action Secrets.
  • A markdown style badge for coverage on the main branch appears near the top of the README.md, and shows accurate information about coverage on the main branch.

Details

  1. Visit the site for the repo, which is at this URL
    (note that you'll have to edit this URL to match your repo). You may
    need to log in first.

  2. On that page, you'll see a place to set the default branch. Be sure
    it is set to main.

  3. On that same page, you'll see the repository upload token. Copy
    that value and store it in the repo Action Secrets as CODECOV_TOKEN.

  4. On that same page, at left you'll see a menu item called Badge.

    Go to that page

    Be sure that the branch selected is main and not master

    Copy the Markdown for the badge.

    Put it in your README.md. (Make a branch and do a PR for this, even
    though it may seem like a trivial change. It's good to practice
    the mechanics here, since you'll need to do them many times in this course.)

Set up a team deployments for prod and qa on Heroku

Set up a team deployments for prod and qa on Heroku

Acceptance Criteria:

Set up codecov token and codecov badge.

Set up codecov token and codecov badge.

Acceptance criteria

  • The repo is enabled on codecov on the main branch.
  • The CODECOV_TOKEN for the repo is uploaded to the Secrets->Actions->Action Secrets.
  • A markdown style badge for coverage on the main branch appears near the top of the README.md, and shows accurate information about coverage on the main branch.

Details

  1. Visit the site for the repo, which is at this URL
    (note that you'll have to edit this URL to match your repo). You may
    need to log in first.

  2. On that page, you'll see a place to set the default branch. Be sure
    it is set to main.

  3. On that same page, you'll see the repository upload token. Copy
    that value and store it in the repo Action Secrets as CODECOV_TOKEN.

  4. On that same page, at left you'll see a menu item called Badge.

    Go to that page

    Be sure that the branch selected is main and not master

    Copy the Markdown for the badge.

    Put it in your README.md. (Make a branch and do a PR for this, even
    though it may seem like a trivial change. It's good to practice
    the mechanics here, since you'll need to do them many times in this course.)

Create database table for CollegiateSubreddits

Create database table for CollegiateSubreddits

Acceptance Criteria:

  • There is an @Entity class called CollegeSubreddit.java
  • There is a @Repository class called CollegeSubredditRepository.java
  • When you start up the repo on localhost, you can see the table
    using the H2 console (see the file docs/h2-database.md for
    instructions.)
  • When you deploy the app to Heroku, you can see the table
    using the psql command (See Accessing Database Console in the
    main README.md file for instructions.)

Details: @Entity class

The @Entity class should be similar to the file Todo.java
in the example repo https://github.com/ucsb-cs156-w22/demo-spring-react-example-v2.

You may also want to consult User.java in the same repo for another example.

Your file will be called CollegiateSubreddit.java and should be placed
in the entities subdirectory of the repo.

It will have a field for id, which should be defined like this:

  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private long id;

And fields for name,location, and subreddit, each of which should be strings, like this:

  private String name;
  private String location;
  private String subreddit;

Also note that the line:

@Entity(name = "todos")

should be replaced with this, since Spring Boot requires CamelCase while SQL requires snake_case:

@Entity(name = "collegiate_subreddits")

The rest, you should be able to figure out on your own.

The main difference is that you do NOT need the following in front of
any of your attributes.

@ManyToOne
@JoinColumn(name = "user_id")

This preceeds the attribute:

  private User user;

which is how we indicate that a particular record belongs to a particular User. We aren't doing that in the case of the records in the CollegeSubreddit table, though it is a common pattern in many
applications.

Details: @Repository class

For the repository class, see the example TodoRepository.java.

You may also consult UserRepository.java in the same repo for another example.

Looking at the sample code, let's figure out what needs to be changed:

@Repository
public interface TodoRepository extends CrudRepository<Todo, Long> {
  Iterable<Todo> findAllByUserId(Long user_id);
}
  1. You'll need to change the name TodoRepository to CollegiateSubredditRepository

  2. You'll need to change Todo to CollegiateSubreddit. This Todo refers back to the @Entity class for a single row in the database.

  3. You'll need to replace the method:

    Iterable<Todo> findAllByUserId(Long user_id);
    

    With these:

    Iterable<CollegiateSubredddit> findByName(String name);
    Iterable<CollegiateSubredddit> findBySubreddit(String subreddit);
    

    Note that one of the suprising things about Spring Boot is that
    you do not need to write code for these methods. Instead, the
    part of the Spring Boot framework known as Spring Data JDBC
    looks at the name you choose for these methods
    and based on that, it writes them for you.

    The rules for translating method naming conventions into
    generated code are complicated: we will not go over all of them in lecture, and you are not expected to memorize or learn them all.
    Instead, you need to be able to find what you need, when you need it.

    Some documentation is here to help get you started: https://docs.spring.io/spring-data/jdbc/docs/current/reference/html/#jdbc.query-methods

    While in this case, we are telling you what methods to add,
    in future cases, you'll be expected to figure out from context
    what kinds of lookup methods you might need for a table, consult
    the Spring Data

Create database table for CollegiateSubreddits

Create database table for CollegiateSubreddits

Acceptance Criteria:

  • There is an @Entity class called CollegeSubreddit.java
  • There is a @Repository class called CollegeSubredditRepository.java
  • When you start up the repo on localhost, you can see the table
    using the H2 console (see the file docs/h2-database.md for
    instructions.)
  • When you deploy the app to Heroku, you can see the table
    using the psql command (See Accessing Database Console in the
    main README.md file for instructions.)

Details: @Entity class

The @Entity class should be similar to the file Todo.java
in the example repo https://github.com/ucsb-cs156-w22/demo-spring-react-example-v2.

You may also want to consult User.java in the same repo for another example.

Your file will be called CollegiateSubreddit.java and should be placed
in the entities subdirectory of the repo.

It will have a field for id, which should be defined like this:

  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private long id;

And fields for name,location, and subreddit, each of which should be strings, like this:

  private String name;
  private String location;
  private String subreddit;

Also note that the line:

@Entity(name = "todos")

should be replaced with this, since Spring Boot requires CamelCase while SQL requires snake_case:

@Entity(name = "collegiate_subreddits")

The rest, you should be able to figure out on your own.

The main difference is that you do NOT need the following in front of
any of your attributes.

@ManyToOne
@JoinColumn(name = "user_id")

This preceeds the attribute:

  private User user;

which is how we indicate that a particular record belongs to a particular User. We aren't doing that in the case of the records in the CollegeSubreddit table, though it is a common pattern in many
applications.

Details: @Repository class

For the repository class, see the example TodoRepository.java.

You may also consult UserRepository.java in the same repo for another example.

Looking at the sample code, let's figure out what needs to be changed:

@Repository
public interface TodoRepository extends CrudRepository<Todo, Long> {
  Iterable<Todo> findAllByUserId(Long user_id);
}
  1. You'll need to change the name TodoRepository to CollegiateSubredditRepository

  2. You'll need to change Todo to CollegiateSubreddit. This Todo refers back to the @Entity class for a single row in the database.

  3. You'll need to replace the method:

    Iterable<Todo> findAllByUserId(Long user_id);
    

    With these:

    Iterable<CollegiateSubredddit> findByName(String name);
    Iterable<CollegiateSubredddit> findBySubreddit(String subreddit);
    

    Note that one of the suprising things about Spring Boot is that
    you do not need to write code for these methods. Instead, the
    part of the Spring Boot framework known as Spring Data JDBC
    looks at the name you choose for these methods
    and based on that, it writes them for you.

    The rules for translating method naming conventions into
    generated code are complicated: we will not go over all of them in lecture, and you are not expected to memorize or learn them all.
    Instead, you need to be able to find what you need, when you need it.

    Some documentation is here to help get you started: https://docs.spring.io/spring-data/jdbc/docs/current/reference/html/#jdbc.query-methods

    While in this case, we are telling you what methods to add,
    in future cases, you'll be expected to figure out from context
    what kinds of lookup methods you might need for a table, consult
    the Spring Data

Create database table for CollegiateSubreddits

Create database table for CollegiateSubreddits

Acceptance Criteria:

  • There is an @Entity class called CollegeSubreddit.java
  • There is a @Repository class called CollegeSubredditRepository.java
  • When you start up the repo on localhost, you can see the table
    using the H2 console (see the file docs/h2-database.md for
    instructions.)
  • When you deploy the app to Heroku, you can see the table
    using the psql command (See Accessing Database Console in the
    main README.md file for instructions.)

Details: @Entity class

The @Entity class should be similar to the file Todo.java
in the example repo https://github.com/ucsb-cs156-w22/demo-spring-react-example-v2.

You may also want to consult User.java in the same repo for another example.

Your file will be called CollegiateSubreddit.java and should be placed
in the entities subdirectory of the repo.

It will have a field for id, which should be defined like this:

  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private long id;

And fields for name,location, and subreddit, each of which should be strings, like this:

  private String name;
  private String location;
  private String subreddit;

Also note that the line:

@Entity(name = "todos")

should be replaced with this, since Spring Boot requires CamelCase while SQL requires snake_case:

@Entity(name = "collegiate_subreddits")

The rest, you should be able to figure out on your own.

The main difference is that you do NOT need the following in front of
any of your attributes.

@ManyToOne
@JoinColumn(name = "user_id")

This preceeds the attribute:

  private User user;

which is how we indicate that a particular record belongs to a particular User. We aren't doing that in the case of the records in the CollegeSubreddit table, though it is a common pattern in many
applications.

Details: @Repository class

For the repository class, see the example TodoRepository.java.

You may also consult UserRepository.java in the same repo for another example.

Looking at the sample code, let's figure out what needs to be changed:

@Repository
public interface TodoRepository extends CrudRepository<Todo, Long> {
  Iterable<Todo> findAllByUserId(Long user_id);
}
  1. You'll need to change the name TodoRepository to CollegiateSubredditRepository

  2. You'll need to change Todo to CollegiateSubreddit. This Todo refers back to the @Entity class for a single row in the database.

  3. You'll need to replace the method:

    Iterable<Todo> findAllByUserId(Long user_id);
    

    With these:

    Iterable<CollegiateSubredddit> findByName(String name);
    Iterable<CollegiateSubredddit> findBySubreddit(String subreddit);
    

    Note that one of the suprising things about Spring Boot is that
    you do not need to write code for these methods. Instead, the
    part of the Spring Boot framework known as Spring Data JDBC
    looks at the name you choose for these methods
    and based on that, it writes them for you.

    The rules for translating method naming conventions into
    generated code are complicated: we will not go over all of them in lecture, and you are not expected to memorize or learn them all.
    Instead, you need to be able to find what you need, when you need it.

    Some documentation is here to help get you started: https://docs.spring.io/spring-data/jdbc/docs/current/reference/html/#jdbc.query-methods

    While in this case, we are telling you what methods to add,
    in future cases, you'll be expected to figure out from context
    what kinds of lookup methods you might need for a table, consult
    the Spring Data

Create database table for CollegiateSubreddits

Create database table for CollegiateSubreddits

Acceptance Criteria:

  • There is a controller file CollegiateSubredditController.java
    in the expected directory.
  • In CollegiateSubredditController.java there is
    code for a GET /api/collegiateSubreddits/all endpoint
    that returns a JSON list of all subreddits in the database
  • In CollegiateSubredditController.java there is
    code for a POST /api/collegiateSubreddits/post endpoint
    that can be used to create a new entry in the table
  • The Swagger-UI endpoints for these are well documented so that
    any member of the team can understand what they are for and
    how to use them.
  • The POST endpoint works as expected, in the sense that new
    records can be added to the database (on localhost).
  • The GET endpoint works as expected, in the sense that the new
    records that are added show up (on localhost).
  • The GET and POST endpoints work as expected when the
    app is deployed to Heroku.
  • There is full test coverage (Jacoco) for the methods in
    CollegiateSubredditController.java
  • There is full mutation test coverage (Pitest) for the methods in
    CollegiateSubredditController.java

Details

Consult the methods in TodosController.java for examples
of controller methods.

Consult the tests in TodosControllerTests.java for examples
of controller tests.

Create database table for CollegiateSubreddits

Create database table for CollegiateSubreddits

Acceptance Criteria:

  • There is an @Entity class called CollegeSubreddit.java
  • There is a @Repository class called CollegeSubredditRepository.java
  • When you start up the repo on localhost, you can see the table
    using the H2 console (see the file docs/h2-database.md for
    instructions.)
  • When you deploy the app to Heroku, you can see the table
    using the psql command (See Accessing Database Console in the
    main README.md file for instructions.)

Details: @Entity class

The @Entity class should be similar to the file Todo.java
in the example repo https://github.com/ucsb-cs156-w22/demo-spring-react-example-v2.

You may also want to consult User.java in the same repo for another example.

Your file will be called CollegiateSubreddit.java and should be placed
in the entities subdirectory of the repo.

It will have a field for id, which should be defined like this:

  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private long id;

And fields for name,location, and subreddit, each of which should be strings, like this:

  private String name;
  private String location;
  private String subreddit;

Also note that the line:

@Entity(name = "todos")

should be replaced with this, since Spring Boot requires CamelCase while SQL requires snake_case:

@Entity(name = "collegiate_subreddits")

The rest, you should be able to figure out on your own.

The main difference is that you do NOT need the following in front of
any of your attributes.

@ManyToOne
@JoinColumn(name = "user_id")

This preceeds the attribute:

  private User user;

which is how we indicate that a particular record belongs to a particular User. We aren't doing that in the case of the records in the CollegeSubreddit table, though it is a common pattern in many
applications.

Details: @Repository class

For the repository class, see the example TodoRepository.java.

You may also consult UserRepository.java in the same repo for another example.

Looking at the sample code, let's figure out what needs to be changed:

@Repository
public interface TodoRepository extends CrudRepository<Todo, Long> {
  Iterable<Todo> findAllByUserId(Long user_id);
}
  1. You'll need to change the name TodoRepository to CollegiateSubredditRepository

  2. You'll need to change Todo to CollegiateSubreddit. This Todo refers back to the @Entity class for a single row in the database.

  3. You'll need to replace the method:

    Iterable<Todo> findAllByUserId(Long user_id);
    

    With these:

    Iterable<CollegiateSubredddit> findByName(String name);
    Iterable<CollegiateSubredddit> findBySubreddit(String subreddit);
    

    Note that one of the suprising things about Spring Boot is that
    you do not need to write code for these methods. Instead, the
    part of the Spring Boot framework known as Spring Data JDBC
    looks at the name you choose for these methods
    and based on that, it writes them for you.

    The rules for translating method naming conventions into
    generated code are complicated: we will not go over all of them in lecture, and you are not expected to memorize or learn them all.
    Instead, you need to be able to find what you need, when you need it.

    Some documentation is here to help get you started: https://docs.spring.io/spring-data/jdbc/docs/current/reference/html/#jdbc.query-methods

    While in this case, we are telling you what methods to add,
    in future cases, you'll be expected to figure out from context
    what kinds of lookup methods you might need for a table, consult
    the Spring Data

Create database table for CollegiateSubreddits

Create database table for CollegiateSubreddits

Acceptance Criteria:

  • There is an @Entity class called CollegeSubreddit.java
  • There is a @Repository class called CollegeSubredditRepository.java
  • When you start up the repo on localhost, you can see the table
    using the H2 console (see the file docs/h2-database.md for
    instructions.)
  • When you deploy the app to Heroku, you can see the table
    using the psql command (See Accessing Database Console in the
    main README.md file for instructions.)

Details: @Entity class

The @Entity class should be similar to the file Todo.java
in the example repo https://github.com/ucsb-cs156-w22/demo-spring-react-example-v2.

You may also want to consult User.java in the same repo for another example.

Your file will be called CollegiateSubreddit.java and should be placed
in the entities subdirectory of the repo.

It will have a field for id, which should be defined like this:

  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private long id;

And fields for name,location, and subreddit, each of which should be strings, like this:

  private String name;
  private String location;
  private String subreddit;

Also note that the line:

@Entity(name = "todos")

should be replaced with this, since Spring Boot requires CamelCase while SQL requires snake_case:

@Entity(name = "collegiate_subreddits")

The rest, you should be able to figure out on your own.

The main difference is that you do NOT need the following in front of
any of your attributes.

@ManyToOne
@JoinColumn(name = "user_id")

This preceeds the attribute:

  private User user;

which is how we indicate that a particular record belongs to a particular User. We aren't doing that in the case of the records in the CollegeSubreddit table, though it is a common pattern in many
applications.

Details: @Repository class

For the repository class, see the example TodoRepository.java.

You may also consult UserRepository.java in the same repo for another example.

Looking at the sample code, let's figure out what needs to be changed:

@Repository
public interface TodoRepository extends CrudRepository<Todo, Long> {
  Iterable<Todo> findAllByUserId(Long user_id);
}
  1. You'll need to change the name TodoRepository to CollegiateSubredditRepository

  2. You'll need to change Todo to CollegiateSubreddit. This Todo refers back to the @Entity class for a single row in the database.

  3. You'll need to replace the method:

    Iterable<Todo> findAllByUserId(Long user_id);
    

    With these:

    Iterable<CollegiateSubredddit> findByName(String name);
    Iterable<CollegiateSubredddit> findBySubreddit(String subreddit);
    

    Note that one of the suprising things about Spring Boot is that
    you do not need to write code for these methods. Instead, the
    part of the Spring Boot framework known as Spring Data JDBC
    looks at the name you choose for these methods
    and based on that, it writes them for you.

    The rules for translating method naming conventions into
    generated code are complicated: we will not go over all of them in lecture, and you are not expected to memorize or learn them all.
    Instead, you need to be able to find what you need, when you need it.

    Some documentation is here to help get you started: https://docs.spring.io/spring-data/jdbc/docs/current/reference/html/#jdbc.query-methods

    While in this case, we are telling you what methods to add,
    in future cases, you'll be expected to figure out from context
    what kinds of lookup methods you might need for a table, consult
    the Spring Data

Create database table for CollegiateSubreddits

Create database table for CollegiateSubreddits

Acceptance Criteria:

  • There is an @Entity class called CollegeSubreddit.java
  • There is a @Repository class called CollegeSubredditRepository.java
  • When you start up the repo on localhost, you can see the table
    using the H2 console (see the file docs/h2-database.md for
    instructions.)
  • When you deploy the app to Heroku, you can see the table
    using the psql command (See Accessing Database Console in the
    main README.md file for instructions.)

Details: @Entity class

The @Entity class should be similar to the file Todo.java
in the example repo https://github.com/ucsb-cs156-w22/demo-spring-react-example-v2.

You may also want to consult User.java in the same repo for another example.

Your file will be called CollegiateSubreddit.java and should be placed
in the entities subdirectory of the repo.

It will have a field for id, which should be defined like this:

  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private long id;

And fields for name,location, and subreddit, each of which should be strings, like this:

  private String name;
  private String location;
  private String subreddit;

Also note that the line:

@Entity(name = "todos")

should be replaced with this, since Spring Boot requires CamelCase while SQL requires snake_case:

@Entity(name = "collegiate_subreddits")

The rest, you should be able to figure out on your own.

The main difference is that you do NOT need the following in front of
any of your attributes.

@ManyToOne
@JoinColumn(name = "user_id")

This preceeds the attribute:

  private User user;

which is how we indicate that a particular record belongs to a particular User. We aren't doing that in the case of the records in the CollegeSubreddit table, though it is a common pattern in many
applications.

Details: @Repository class

For the repository class, see the example TodoRepository.java.

You may also consult UserRepository.java in the same repo for another example.

Looking at the sample code, let's figure out what needs to be changed:

@Repository
public interface TodoRepository extends CrudRepository<Todo, Long> {
  Iterable<Todo> findAllByUserId(Long user_id);
}
  1. You'll need to change the name TodoRepository to CollegiateSubredditRepository

  2. You'll need to change Todo to CollegiateSubreddit. This Todo refers back to the @Entity class for a single row in the database.

  3. You'll need to replace the method:

    Iterable<Todo> findAllByUserId(Long user_id);
    

    With these:

    Iterable<CollegiateSubredddit> findByName(String name);
    Iterable<CollegiateSubredddit> findBySubreddit(String subreddit);
    

    Note that one of the suprising things about Spring Boot is that
    you do not need to write code for these methods. Instead, the
    part of the Spring Boot framework known as Spring Data JDBC
    looks at the name you choose for these methods
    and based on that, it writes them for you.

    The rules for translating method naming conventions into
    generated code are complicated: we will not go over all of them in lecture, and you are not expected to memorize or learn them all.
    Instead, you need to be able to find what you need, when you need it.

    Some documentation is here to help get you started: https://docs.spring.io/spring-data/jdbc/docs/current/reference/html/#jdbc.query-methods

    While in this case, we are telling you what methods to add,
    in future cases, you'll be expected to figure out from context
    what kinds of lookup methods you might need for a table, consult
    the Spring Data

Create database table for CollegiateSubreddits

Create database table for CollegiateSubreddits

Acceptance Criteria:

  • There is an @Entity class called CollegeSubreddit.java
  • There is a @Repository class called CollegeSubredditRepository.java
  • When you start up the repo on localhost, you can see the table
    using the H2 console (see the file docs/h2-database.md for
    instructions.)
  • When you deploy the app to Heroku, you can see the table
    using the psql command (See Accessing Database Console in the
    main README.md file for instructions.)

Details: @Entity class

The @Entity class should be similar to the file Todo.java
in the example repo https://github.com/ucsb-cs156-w22/demo-spring-react-example-v2.

You may also want to consult User.java in the same repo for another example.

Your file will be called CollegiateSubreddit.java and should be placed
in the entities subdirectory of the repo.

It will have a field for id, which should be defined like this:

  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private long id;

And fields for name,location, and subreddit, each of which should be strings, like this:

  private String name;
  private String location;
  private String subreddit;

Also note that the line:

@Entity(name = "todos")

should be replaced with this, since Spring Boot requires CamelCase while SQL requires snake_case:

@Entity(name = "collegiate_subreddits")

The rest, you should be able to figure out on your own.

The main difference is that you do NOT need the following in front of
any of your attributes.

@ManyToOne
@JoinColumn(name = "user_id")

This preceeds the attribute:

  private User user;

which is how we indicate that a particular record belongs to a particular User. We aren't doing that in the case of the records in the CollegeSubreddit table, though it is a common pattern in many
applications.

Details: @Repository class

For the repository class, see the example TodoRepository.java.

You may also consult UserRepository.java in the same repo for another example.

Looking at the sample code, let's figure out what needs to be changed:

@Repository
public interface TodoRepository extends CrudRepository<Todo, Long> {
  Iterable<Todo> findAllByUserId(Long user_id);
}
  1. You'll need to change the name TodoRepository to CollegiateSubredditRepository

  2. You'll need to change Todo to CollegiateSubreddit. This Todo refers back to the @Entity class for a single row in the database.

  3. You'll need to replace the method:

    Iterable<Todo> findAllByUserId(Long user_id);
    

    With these:

    Iterable<CollegiateSubredddit> findByName(String name);
    Iterable<CollegiateSubredddit> findBySubreddit(String subreddit);
    

    Note that one of the suprising things about Spring Boot is that
    you do not need to write code for these methods. Instead, the
    part of the Spring Boot framework known as Spring Data JDBC
    looks at the name you choose for these methods
    and based on that, it writes them for you.

    The rules for translating method naming conventions into
    generated code are complicated: we will not go over all of them in lecture, and you are not expected to memorize or learn them all.
    Instead, you need to be able to find what you need, when you need it.

    Some documentation is here to help get you started: https://docs.spring.io/spring-data/jdbc/docs/current/reference/html/#jdbc.query-methods

    While in this case, we are telling you what methods to add,
    in future cases, you'll be expected to figure out from context
    what kinds of lookup methods you might need for a table, consult
    the Spring Data

Create database table for CollegiateSubreddits

Create database table for CollegiateSubreddits

Acceptance Criteria:

  • There is an @Entity class called CollegeSubreddit.java
  • There is a @Repository class called CollegeSubredditRepository.java
  • When you start up the repo on localhost, you can see the table
    using the H2 console (see the file docs/h2-database.md for
    instructions.)
  • When you deploy the app to Heroku, you can see the table
    using the psql command (See Accessing Database Console in the
    main README.md file for instructions.)

Details: @Entity class

The @Entity class should be similar to the file Todo.java
in the example repo https://github.com/ucsb-cs156-w22/demo-spring-react-example-v2.

You may also want to consult User.java in the same repo for another example.

Your file will be called CollegiateSubreddit.java and should be placed
in the entities subdirectory of the repo.

It will have a field for id, which should be defined like this:

  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private long id;

And fields for name,location, and subreddit, each of which should be strings, like this:

  private String name;
  private String location;
  private String subreddit;

Also note that the line:

@Entity(name = "todos")

should be replaced with this, since Spring Boot requires CamelCase while SQL requires snake_case:

@Entity(name = "collegiate_subreddits")

The rest, you should be able to figure out on your own.

The main difference is that you do NOT need the following in front of
any of your attributes.

@ManyToOne
@JoinColumn(name = "user_id")

This preceeds the attribute:

  private User user;

which is how we indicate that a particular record belongs to a particular User. We aren't doing that in the case of the records in the CollegeSubreddit table, though it is a common pattern in many
applications.

Details: @Repository class

For the repository class, see the example TodoRepository.java.

You may also consult UserRepository.java in the same repo for another example.

Looking at the sample code, let's figure out what needs to be changed:

@Repository
public interface TodoRepository extends CrudRepository<Todo, Long> {
  Iterable<Todo> findAllByUserId(Long user_id);
}
  1. You'll need to change the name TodoRepository to CollegiateSubredditRepository

  2. You'll need to change Todo to CollegiateSubreddit. This Todo refers back to the @Entity class for a single row in the database.

  3. You'll need to replace the method:

    Iterable<Todo> findAllByUserId(Long user_id);
    

    With these:

    Iterable<CollegiateSubredddit> findByName(String name);
    Iterable<CollegiateSubredddit> findBySubreddit(String subreddit);
    

    Note that one of the suprising things about Spring Boot is that
    you do not need to write code for these methods. Instead, the
    part of the Spring Boot framework known as Spring Data JDBC
    looks at the name you choose for these methods
    and based on that, it writes them for you.

    The rules for translating method naming conventions into
    generated code are complicated: we will not go over all of them in lecture, and you are not expected to memorize or learn them all.
    Instead, you need to be able to find what you need, when you need it.

    Some documentation is here to help get you started: https://docs.spring.io/spring-data/jdbc/docs/current/reference/html/#jdbc.query-methods

    While in this case, we are telling you what methods to add,
    in future cases, you'll be expected to figure out from context
    what kinds of lookup methods you might need for a table, consult
    the Spring Data

Create database table for CollegiateSubreddits

Create database table for CollegiateSubreddits

Acceptance Criteria:

  • There is an @Entity class called CollegeSubreddit.java
  • There is a @Repository class called CollegeSubredditRepository.java
  • When you start up the repo on localhost, you can see the table
    using the H2 console (see the file docs/h2-database.md for
    instructions.)
  • When you deploy the app to Heroku, you can see the table
    using the psql command (See Accessing Database Console in the
    main README.md file for instructions.)

Details: @Entity class

The @Entity class should be similar to the file Todo.java
in the example repo https://github.com/ucsb-cs156-w22/demo-spring-react-example-v2.

You may also want to consult User.java in the same repo for another example.

Your file will be called CollegiateSubreddit.java and should be placed
in the entities subdirectory of the repo.

It will have a field for id, which should be defined like this:

  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private long id;

And fields for name,location, and subreddit, each of which should be strings, like this:

  private String name;
  private String location;
  private String subreddit;

Also note that the line:

@Entity(name = "todos")

should be replaced with this, since Spring Boot requires CamelCase while SQL requires snake_case:

@Entity(name = "collegiate_subreddits")

The rest, you should be able to figure out on your own.

The main difference is that you do NOT need the following in front of
any of your attributes.

@ManyToOne
@JoinColumn(name = "user_id")

This preceeds the attribute:

  private User user;

which is how we indicate that a particular record belongs to a particular User. We aren't doing that in the case of the records in the CollegeSubreddit table, though it is a common pattern in many
applications.

Details: @Repository class

For the repository class, see the example TodoRepository.java.

You may also consult UserRepository.java in the same repo for another example.

Looking at the sample code, let's figure out what needs to be changed:

@Repository
public interface TodoRepository extends CrudRepository<Todo, Long> {
  Iterable<Todo> findAllByUserId(Long user_id);
}
  1. You'll need to change the name TodoRepository to CollegiateSubredditRepository

  2. You'll need to change Todo to CollegiateSubreddit. This Todo refers back to the @Entity class for a single row in the database.

  3. You'll need to replace the method:

    Iterable<Todo> findAllByUserId(Long user_id);
    

    With these:

    Iterable<CollegiateSubredddit> findByName(String name);
    Iterable<CollegiateSubredddit> findBySubreddit(String subreddit);
    

    Note that one of the suprising things about Spring Boot is that
    you do not need to write code for these methods. Instead, the
    part of the Spring Boot framework known as Spring Data JDBC
    looks at the name you choose for these methods
    and based on that, it writes them for you.

    The rules for translating method naming conventions into
    generated code are complicated: we will not go over all of them in lecture, and you are not expected to memorize or learn them all.
    Instead, you need to be able to find what you need, when you need it.

    Some documentation is here to help get you started: https://docs.spring.io/spring-data/jdbc/docs/current/reference/html/#jdbc.query-methods

    While in this case, we are telling you what methods to add,
    in future cases, you'll be expected to figure out from context
    what kinds of lookup methods you might need for a table, consult
    the Spring Data

Create database table for CollegiateSubreddits

Create database table for CollegiateSubreddits

Acceptance Criteria:

  • There is an @Entity class called CollegeSubreddit.java
  • There is a @Repository class called CollegeSubredditRepository.java
  • When you start up the repo on localhost, you can see the table
    using the H2 console (see the file docs/h2-database.md for
    instructions.)
  • When you deploy the app to Heroku, you can see the table
    using the psql command (See Accessing Database Console in the
    main README.md file for instructions.)

Details: @Entity class

The @Entity class should be similar to the file Todo.java
in the example repo https://github.com/ucsb-cs156-w22/demo-spring-react-example-v2.

You may also want to consult User.java in the same repo for another example.

Your file will be called CollegiateSubreddit.java and should be placed
in the entities subdirectory of the repo.

It will have a field for id, which should be defined like this:

  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private long id;

And fields for name,location, and subreddit, each of which should be strings, like this:

  private String name;
  private String location;
  private String subreddit;

Also note that the line:

@Entity(name = "todos")

should be replaced with this, since Spring Boot requires CamelCase while SQL requires snake_case:

@Entity(name = "collegiate_subreddits")

The rest, you should be able to figure out on your own.

The main difference is that you do NOT need the following in front of
any of your attributes.

@ManyToOne
@JoinColumn(name = "user_id")

This preceeds the attribute:

  private User user;

which is how we indicate that a particular record belongs to a particular User. We aren't doing that in the case of the records in the CollegeSubreddit table, though it is a common pattern in many
applications.

Details: @Repository class

For the repository class, see the example TodoRepository.java.

You may also consult UserRepository.java in the same repo for another example.

Looking at the sample code, let's figure out what needs to be changed:

@Repository
public interface TodoRepository extends CrudRepository<Todo, Long> {
  Iterable<Todo> findAllByUserId(Long user_id);
}
  1. You'll need to change the name TodoRepository to CollegiateSubredditRepository

  2. You'll need to change Todo to CollegiateSubreddit. This Todo refers back to the @Entity class for a single row in the database.

  3. You'll need to replace the method:

    Iterable<Todo> findAllByUserId(Long user_id);
    

    With these:

    Iterable<CollegiateSubredddit> findByName(String name);
    Iterable<CollegiateSubredddit> findBySubreddit(String subreddit);
    

    Note that one of the suprising things about Spring Boot is that
    you do not need to write code for these methods. Instead, the
    part of the Spring Boot framework known as Spring Data JDBC
    looks at the name you choose for these methods
    and based on that, it writes them for you.

    The rules for translating method naming conventions into
    generated code are complicated: we will not go over all of them in lecture, and you are not expected to memorize or learn them all.
    Instead, you need to be able to find what you need, when you need it.

    Some documentation is here to help get you started: https://docs.spring.io/spring-data/jdbc/docs/current/reference/html/#jdbc.query-methods

    While in this case, we are telling you what methods to add,
    in future cases, you'll be expected to figure out from context
    what kinds of lookup methods you might need for a table, consult
    the Spring Data

Create database table for CollegiateSubreddits

Create database table for CollegiateSubreddits

Acceptance Criteria:

  • There is an @Entity class called CollegeSubreddit.java
  • There is a @Repository class called CollegeSubredditRepository.java
  • When you start up the repo on localhost, you can see the table
    using the H2 console (see the file docs/h2-database.md for
    instructions.)
  • When you deploy the app to Heroku, you can see the table
    using the psql command (See Accessing Database Console in the
    main README.md file for instructions.)

Details: @Entity class

The @Entity class should be similar to the file Todo.java
in the example repo https://github.com/ucsb-cs156-w22/demo-spring-react-example-v2.

You may also want to consult User.java in the same repo for another example.

Your file will be called CollegiateSubreddit.java and should be placed
in the entities subdirectory of the repo.

It will have a field for id, which should be defined like this:

  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private long id;

And fields for name,location, and subreddit, each of which should be strings, like this:

  private String name;
  private String location;
  private String subreddit;

Also note that the line:

@Entity(name = "todos")

should be replaced with this, since Spring Boot requires CamelCase while SQL requires snake_case:

@Entity(name = "collegiate_subreddits")

The rest, you should be able to figure out on your own.

The main difference is that you do NOT need the following in front of
any of your attributes.

@ManyToOne
@JoinColumn(name = "user_id")

This preceeds the attribute:

  private User user;

which is how we indicate that a particular record belongs to a particular User. We aren't doing that in the case of the records in the CollegeSubreddit table, though it is a common pattern in many
applications.

Details: @Repository class

For the repository class, see the example TodoRepository.java.

You may also consult UserRepository.java in the same repo for another example.

Looking at the sample code, let's figure out what needs to be changed:

@Repository
public interface TodoRepository extends CrudRepository<Todo, Long> {
  Iterable<Todo> findAllByUserId(Long user_id);
}
  1. You'll need to change the name TodoRepository to CollegiateSubredditRepository

  2. You'll need to change Todo to CollegiateSubreddit. This Todo refers back to the @Entity class for a single row in the database.

  3. You'll need to replace the method:

    Iterable<Todo> findAllByUserId(Long user_id);
    

    With these:

    Iterable<CollegiateSubredddit> findByName(String name);
    Iterable<CollegiateSubredddit> findBySubreddit(String subreddit);
    

    Note that one of the suprising things about Spring Boot is that
    you do not need to write code for these methods. Instead, the
    part of the Spring Boot framework known as Spring Data JDBC
    looks at the name you choose for these methods
    and based on that, it writes them for you.

    The rules for translating method naming conventions into
    generated code are complicated: we will not go over all of them in lecture, and you are not expected to memorize or learn them all.
    Instead, you need to be able to find what you need, when you need it.

    Some documentation is here to help get you started: https://docs.spring.io/spring-data/jdbc/docs/current/reference/html/#jdbc.query-methods

    While in this case, we are telling you what methods to add,
    in future cases, you'll be expected to figure out from context
    what kinds of lookup methods you might need for a table, consult
    the Spring Data

Set up a team deployments for prod and qa on Heroku

Set up a team deployments for prod and qa on Heroku

Acceptance Criteria:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.