Skip to content

Commit

Permalink
add copyright headers and minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
reugn committed Jan 23, 2025
1 parent e0139de commit 9568f6f
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.springframework.boot.autoconfigure.condition;

import org.springframework.context.annotation.Condition;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.springframework.boot.autoconfigure.condition;

import org.springframework.context.annotation.Condition;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.springframework.boot.autoconfigure.condition;

import org.springframework.context.annotation.Condition;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.springframework.boot.autoconfigure.util;

import com.aerospike.client.Host;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package org.springframework.boot.client.reactive.autoconfigure;

/*
* Copyright 2019 the original author or authors.
* Copyright 2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,6 +14,8 @@
* limitations under the License.
*/

package org.springframework.boot.client.reactive.autoconfigure;

import com.aerospike.client.IAerospikeClient;
import com.aerospike.client.reactor.AerospikeReactorClient;
import com.aerospike.client.reactor.IAerospikeReactorClient;
Expand Down Expand Up @@ -51,4 +51,4 @@ public IAerospikeReactorClient aerospikeReactorClient(IAerospikeClient aerospike
log.info("Initializing Aerospike Reactor Java client");
return new AerospikeReactorClient(aerospikeClient);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package org.springframework.boot.client.autoconfigure;

/*
* Copyright 2019 the original author or authors.
* Copyright 2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,6 +14,8 @@
* limitations under the License.
*/

package org.springframework.boot.client.autoconfigure;

import com.aerospike.client.AerospikeClient;
import com.aerospike.client.Host;
import com.aerospike.client.IAerospikeClient;
Expand All @@ -38,7 +38,6 @@
*
* @author Anastasiia Smirnova
*/
//@EnableAutoConfiguration
@AutoConfiguration
@Conditional(IsClientOnly.class)
@ConditionalOnClass(IAerospikeClient.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,4 @@ public interface ReactiveCityRepository extends Repository<City, Long> {
Mono<City> save(City city);

Mono<City> findById(Long id);

}
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ public class Customer {
private String lastName;
private long age;
}

Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public Customer createCustomer(@Valid @RequestBody Customer customer) {
public ResponseEntity<Customer> getCustomerById(@PathVariable(value = "id") String customerId) {
return repository.findById(customerId)
.map(body -> {
log.info("Retrieved " + body);
log.info("Retrieved {}", body);
return ResponseEntity.ok(body);
})
.orElse(ResponseEntity.noContent().build());
Expand All @@ -51,7 +51,7 @@ public ResponseEntity<Customer> updateCustomer(@PathVariable(value = "id") Strin
existing.setLastName(customer.getLastName());
existing.setAge(customer.getAge());
Customer result = repository.save(existing);
log.info("Updated " + result);
log.info("Updated {}", result);
return result;
})
.map(ResponseEntity::ok)
Expand Down Expand Up @@ -84,7 +84,7 @@ public Iterable<Customer> getAllCustomers() {
@GetMapping("/customers/search")
public List<Customer> getAllCustomersByLastName(@RequestParam(value = "lastName") String lastName) {
List<Customer> result = repository.findByLastNameOrderByFirstNameAsc(lastName);
log.info("Retrieved all customers with last name " + lastName);
log.info("Retrieved all customers with last name {}", lastName);
return result;
}
}

0 comments on commit 9568f6f

Please sign in to comment.