Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version 1.0 #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

version 1.0 #9

wants to merge 1 commit into from

Conversation

munlite
Copy link
Owner

@munlite munlite commented Apr 2, 2020

No description provided.

@@ -0,0 +1,45 @@
1585294247976:help

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Лог заливать не нужно.


@Bean
public RestTemplate getRestTemplate(){

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Лишние строки в коде - это делает код более громоздким и неудобным для чтения.

@Override
public List<String> selectAll() {

return jdbcTemplate.query(SQL_SELECT_ALL, ((rs,rowNum) ->

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Форматирование затрудняет чтение кода.


headers = new HttpHeaders();
headers.set("x-rapidapi-host", "community-open-weather-map.p.rapidapi.com");
headers.set("x-rapidapi-key", "cdd96ad95amsheebcca53e65aac1p136010jsn18e30e4e6350");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не очень безопасно держать здесь ключ, т.к. его все видят. Попробуйте убрать в переменные окружения.

@Service
public class WeatherServiceImpl implements WeatherService {

private final static String URL = "https://community-open-weather-map.p.rapidapi.com/weather?q=";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Хедеры и урлы - тоже можно убрать в переменные.

@pavelsilent
Copy link

Хорошая работа. Есть несколько замечаний. Попробуйте их устранить.
Также можете попробовать выполнить задание со звездочкой.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants