-
Notifications
You must be signed in to change notification settings - Fork 2
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
Kotlin archetypes: component, spring-mvc #14
base: master
Are you sure you want to change the base?
Conversation
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-resources-plugin</artifactId> | ||
<configuration> | ||
<addDefaultExcludes>false</addDefaultExcludes> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for adding .gitignore
to generated projects
* You'll probably want to do something more than | ||
* store a String. | ||
*/ | ||
public class ComponentJava { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some java code to show Java and Kotlin can live together
## 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. | ||
#set( $D = '\$' ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to escape it since $
has special meaning on Kotling strings
properties = ["ot.component.config=foo"], | ||
classes = [ComponentKotlinConfiguration::class] | ||
) | ||
// must be @Autowired not @Inject |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for having componentKotlin: ComponentKotlin
as immutable field (and constructor argument) we need to use @Autowired
and JUnit5
Here I'm presenting a couple of new archetypes:
spring-archetype-component-kotlin
to create spring based components in kotlin, andspring-archetype-service-mvc-kotlin
to create spring-mvc services in kotlinBoth were already tested on my local environment.
Also I'm using JUnit5 on Kotlin tests
Let me know if it's ok to have them, I had this idea after reading that we are open to use kotlin if the concrete team and manager agrees.